The information in this article applies to:
SUMMARY
Moderate: Requires basic macro, coding, and interoperability skills.
These error messages can result if one of the following is true:
MORE INFORMATION"Can't bind name '<argument>'Error messageYou receive the "Can't bind name" 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 function produces the "Can't bind name 'Davolio'" error message:
The correct syntax for the last line of code above is as follows:
"Type Mismatch" Error MessageYou receive the "Type Mismatch" 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 the "Type Mismatch" error message:
The correct syntax for the last line of code above is as follows:
Keep the following requirements in mind:
"1 Parameters Were Expected, But Only 0 Were Supplied" Error MessageYou may receive this error message when you use the CreateDynaset method in Access Basic 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. The following sample code generates the error message when Query1 has the parameter "[Enter a Name]" in the Criteria for the Last Name 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 CreateDynaset method. A syntactically correct example is as follows. NOTE: In the following example, an underscore (_) is used as a line- continuation character. Remove the underscore from the end of the line when re-creating this example.
This SELECT statement points to a control on a form for the WHERE clause. [Employee ID] is a numeric field type and the contents of the control are numeric. Additional query words: parameters
Keywords : kberrmsg kbprg PgmObj |
Last Reviewed: March 20, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |