About using Name AutoCorrect to fix errors caused by renaming (MDB)

Microsoft Office Access 2003

Show All Show All

About using Name AutoCorrect to fix errors caused by renaming (MDB)

Note  The information in this topic applies only to a Microsoft Access database (.mdb).

In Microsoft Access 97 and previous versions, if you rename a field in a table, the objects based on that field no longer display the data from that field. In Access 2000 or later, you can make Access track name changes, or automatically correct common side effects that occur when you rename forms, reports, tables, queries, fields, text boxes or other controls in a Microsoft Access database. This feature is called Name AutoCorrect.

You can enable name AutoCorrect in three levels:

  • Track name changes.

    When you choose to track name changes, Access simply keeps track of the name changes in the database. It does not fix the errors caused by renaming. The tracking information is stored in name maps. When you enable tracking for the first time, Access creates name maps for each existing database object, keeps it up-to-date. The maps are used to fix errors caused by renaming, as well as to generate object dependency information.

  • Track changes and automatically fix errors caused by renaming.

    After enabling tracking, you can choose to have Access automatically fix name changes as and when they are made. The name maps created when you enabled tracking are used to fix the errors.

  • Track changes, fix errors, and maintain a log of changes made by name AutoCorrect.

    Access will maintain a log of changes made to object names. Each change will appear as a record in the Name AutoCorrect Log table.

The name AutoCorrect settings are available on the General tab of the Options dialog box.

Name AutoCorrect and object dependency information

Microsoft Office Access 2003 makes it possible to view dependency information for tables, queries, forms, and reports. You can view the list of objects that depend on a selected table or form, and also view the objects that the table or form depends on. The dependency information is generated from name maps that are created when you enable name AutoCorrect. The name map of an object is updated each time you save and close it.

ShowEnabling tracking name changes

When you enable tracking name changes, Access does the following:

  1. Attempts to get exclusive access to the database.
  2. Searches for objects that are open.
  3. Prompts and closes open objects.
  4. Updates name maps by opening, saving, and closing all tables, queries, forms, and reports.

    This step can take several minutes. You can press Esc to cancel this step. However, the name maps of some objects will be outdated, and you will not be able to view the dependency information of such objects, until you enable the name AutoCorrect feature again.

    Note  If you interrupt Access when it is updating the name maps, Access does not turn off tracking. The Track name AutoCorrect option will be left selected even though some name maps are outdated. To restart the process of updating name maps, clear the option, click Apply, and then select it again. Or, you can manually update an object's name map by opening it in Design view and saving it.

  • Access returns the database to whatever state it was in before it was promoted to Exclusive.
  • Tracking name changes is not automatically turned on when you convert databases created using Access 97 or earlier. When you create a database using Access 2000 or later, tracking is turned on by default.

    ShowTurning off tracking name changes

    When you turn off tracking name changes, Access does the following:

    1. Attempts to get exclusive access to the database.
    2. Searches for objects that are open.
    3. Prompts and closes open objects.
    4. Removes name maps from all tables, queries, forms, and reports.
    5. Access returns the database to whatever state it was in before it was promoted to Exclusive.

    If Access fails to complete the process of tracking changes or removing name maps due to errors or lack of sufficient permissions, it will log the error in the Name AutoCorrect Save Failures table.

    When tracking name changes is enabled for a database, you might notice an increase in the database size. Removing name maps reduces the size of the database.

    Note  If you encounter an error while trying to dependency information of an object, make sure you have permission to save objects. Also, clear the Track name AutoCorrect info check box on the General tab of the Options dialog box, click Apply, and then select the check box again.