The information in this article applies to:
SUMMARY
Moderate: Requires basic macro, coding, and interoperability skills.
MORE INFORMATION
With the advent of Microsoft Access 2.0 and data access objects (DAO), all
objects have a Name property. Name is also a very common field name. This
creates a conflict when you are running a 1.x database in Microsoft Access
2.0. When you refer to an ambiguously qualified object, both Microsoft
Access 1.x and 2.0 have a predetermined search path to locate the object.
The search order is as follows:
If a field has the same name as a property, the value of the property is returned instead of the value of the field. In order to deal with the new Name property, the search order when referring to Name changes to:
Note that this only applies to Name and not to any other property. Listed below is acceptable ambiguous syntax in Microsoft Access 1.x and unambiguous syntax in Microsoft Access versions 1.x and 2.0. Microsoft Access 2.0 handles the ambiguous syntax correctly when you are using an Access 1.x database. Acceptable (Ambiguous) 1.x Syntax
Unambiguous 1.x and 2.0 Syntax
Using Naming ConventionsAmbiguously referenced objects can also be correctly referenced by using a naming convention that includes a standard prefix or suffix that can be attached to object names. For example, ctlName could indicate a control, and fldName could indicate a field.Converting to Microsoft Access 2.0When you are converting a Microsoft Access 1.x database to 2.0 format, you must use the unambiguous method to reference fields and controls that have the same names as properties.REFERENCESFor more information about identifiers in expressions, search for "identifiers in expressions" using the Microsoft Access 2.0 Help menu. Additional query words: dao
Keywords : kbusage ExrOthr |
Last Reviewed: April 3, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |