The information in this article applies to:
Moderate: Requires basic macro, coding, and interoperability skills. This article applies only to a Microsoft Access database (.mdb). SYMPTOMSWhen you run or compile a procedure in a Microsoft Access database that references a field that has the same name as a data access method of a Recordset object, you may receive one of the following error messages:
-or-
-or-
CAUSEYou used the dot (.) syntax when you referenced a field that has the same name as a data access method of a Recordset object. For example, you may have a field called "Close" that is preceded by a dot, as follows:
RESOLUTIONNOTE: The sample code in this article uses Microsoft Data Access
Objects. For this code to run properly, you need to reference
the Microsoft DAO 3.6 Object Library.
MORE INFORMATIONThe particular error message that you receive when you run or compile a procedure depends on the assigned name of the referenced field as follows: If you receive the "Expected Function or variable" error message, then your field has the same name as one of the following data access methods for Recordset objects:If you receive the "Argument not optional" error message, your field has the same name as one of the following data access methods for Recordset objects: Steps to Reproduce Behavior
REFERENCESFor more information about naming conventions, in the Visual Basic Editor, click
Microsoft Visual Basic Help on the Help menu, type "naming conventions" in
the Office Assistant or the Answer Wizard, and then click Search to
view the topic. Additional query words: argument not optional type mismatch prb
Keywords : kberrmsg kbprg kbdta |
Last Reviewed: May 17, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |