The information in this article applies to:
SUMMARY
Moderate: Requires basic macro, coding, and interoperability skills.
-or-
-or-In Microsoft Access 2.0 and 7.0 -------------------------------
-or-
-or-In Microsoft Access 7.0 and 97 ------------------------------
-or-In Microsoft Access 2.0 -----------------------
MORE INFORMATION
These error messages can occur if one of the following is true:
Microsoft Jet Engine error(3070) or "Can't bind name '<argument>'" ErrorYou may receive the Microsoft Jet Engine error message or the "Can't bind name '<argument>'" error message when you concatenate a variable or control that has a String data type in a method or function as a Numeric data type. For example, the following sample function produces one of these error messages:
The correct syntax for the last line of the code above is as follows:
"Type Mismatch" or "Data Type Mismatch in Criteria Expression" ErrorYou may receive the "Type Mismatch" or "Data Type Mismatch in Criteria Expression" error message when you concatenate a variable or control that has a Numeric data type in a method or function as a String data type. For example, the following function produces one of these error messages:
The correct syntax for the next to the last line of the code above is as
follows:
Keep the following requirements in mind:
"Too few parameters. Expected 1" ErrorYou may receive this error message when you use the OpenRecordset method in code on an existing query. If the query is a parameter query, you need to explicitly declare the parameter and its data type and set the parameter value for that query in the function.For example in Query1, which includes fields from the Employees table in the sample database Northwind.mdb (or NWIND.MDB in version 2.0), the following sample code generates the error message when Query1 has the parameter "[Enter a City]" in the criteria for the [City] field:
When you refer to the parameter query, the correct syntax is as follows:
The same error message may appear when you concatenate a variable in the
SQL SELECT statement of a OpenRecordset method. A syntactically correct
example is as follows.
NOTE: In the following statement, an underscore (_) at the end of a line is used as a line-continuation character. Remove the underscore from the end of the line when re-creating this statement.
This SELECT statement points to a control on a form for the WHERE clause.
[City] is a Text field type and the contents of the control are text.
REFERENCESFor more information about concatenating variables or controls in Microsoft Access versions 1.x, please see the following article in the Microsoft Knowledge Base: Q96576 ACC1x: Error Messages when Concatenating Variables or Controls Additional query words: parameters
Keywords : kberrmsg kbprg |
Last Reviewed: October 20, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |