Novice: Requires knowledge of the user interface on single-user computers.
This article applies only to a Microsoft Access database (.mdb).
MORE INFORMATION
How AutoCorrect Works
In order for Microsoft Access 2000 to automatically repair a name change to a table, query, form, report, or field, Microsoft Access needs to store some information about each object and its contents. This information is called a name map. Name maps are created on a per object basis, which means each table, query, form, and report can have a name map.
To have Microsoft Access 2000 create a name map,
Track Name AutoCorrect info must be enabled before you create and save an object.
Track Name AutoCorrect info is enabled by default for new databases created with Microsoft Access 2000 and is disabled by default for databases that are converted from earlier versions of Microsoft Access. To create a name map for objects created before
Track Name AutoCorrect info was enabled, open the object in Design view, and then save the object. When Access saves the object, it creates a name map for the object.
NOTE: To enable
Track Name AutoCorrect info, click
Options on the
Tools menu. In the
Options dialog box, click the
General tab, and then click to select the
Track Name AutoCorrect info check box.
What Is Needed Besides Track Name AutoCorrect Info
Track Name AutoCorrect info only tells Microsoft Access 2000 to create the name map and to keep track of name changes. It does not actually perform any corrections. To have Microsoft Access 2000 perform name changes throughout the database, click to select the
Perform name AutoCorrect check box on the
General tab of the
Options dialog box. If
Perform name AutoCorrect is enabled, when you open an object, Access checks to see if a name change needs to be applied to that object or its contents. If a change has occurred, Access makes the necessary name changes automatically.
For Name AutoCorrect to work, the object in which a name change occurs must have a name map associated with it. If the object doesn't have a name map, Name AutoCorrect is not able to repair the name change for that object even though Name AutoCorrect is enabled to track and perform the name change.
For example, Form1 is based on Table1. Form1 is created when track and perform name changes is disabled. Therefore, Form1 does not have a name map. Subsequently, you enable track and perform name changes. In Table1, you then change the first field's name from Field1 to CompanyName. However, when you open Form1, you see the #Name? error for Field1 because the name map for Form1 doesn't exist and Access cannot resolve the Field1 name change.
Even though Name AutoCorrect is currently enabled to track and perform name changes, Name AutoCorrect cannot repair the name change to Field1
because Form1 was created before Name AutoCorrect was enabled.
What Name Maps Are Made Of
Name Maps are made up of:
-
The names of the fields within the table, query, form, or report.
-
GUIDs for each object, column, or control that is referenced.
-
For top level referenced objects, the last modified date/time stamp for that object.
-
Query, form, and report name maps contain the record source or input table or query name. In addition, if a form or report contains a combo box or list box, the row source for those controls will be stored as part of the object's name map.
-
Name maps for tables contain the row source for any lookup columns.
For example, the name map for the Customers form in the sample database Northwind.mdb would contain:
-
The name of the form's record source, which is the Customers table, and the row source for the Country combo box.
-
The names of all the fields in the form from the Customers table that are referenced by controls on the form.
-
The GUIDs for the Customers table and the referenced fields.
-
The last modified date/time stamp from the Customers table.
NOTE: Name map information is for Microsoft Access only and cannot be referenced programmatically nor be used to obtain information about an object.
Size of a Name Map
Because name maps are made up of field names, table names, query names, form names, and so on, the size of those names contributes to the size of a name map. Typically, a name map is not greater than 4 kilobytes (KB). However, for objects with a large number of fields or long names, the size of the name map could increase. The maximum size of a name map is 64 KB.
What Name AutoCorrect Repairs and Does Not Repair
Name AutoCorrect only performs name corrections for tables, queries, forms, reports, and fields. Name AutoCorrect does not track or perform name changes for data access pages, macros, or modules, or for any code within a module. Name AutoCorrect is not available in replicated databases and in Microsoft Access projects (.ADP).