The information in this article applies to:
SYMPTOMS
Moderate: Requires basic macro, coding, and interoperability skills.
When you click More Help in the error message box, you also receive the following error
RESOLUTIONThe following four methods enable you to work around this behavior. Method 1: Use a ParameterYou can use a parameter in the query in place of the InputBox() function. For example, instead of the expression
use the parameter:
Then on the Query menu, click Parameters and type the parameter again, along with its associated data type, in the Query Parameters dialog box. For more information about parameter queries, search the Help Index for "parameter queries." Method 2: Use the Eval() FunctionYou can wrap the InputBox() function inside the Eval() function. Use two sets of quotation marks (") or one set of apostrophes (') around each of the text arguments for the InputBox() function. For example, instead of the expression
use the expression:
Method 3: Use the Query by Form TechniqueIf the information you want to type in the input box can be obtained from a form, you can use the query by form technique to supply the criteria. For example, instead of the expression
use the expression:
For more information about using the query by form technique, search the Help Index for "query by form," and see the following article in the Microsoft Knowledge Base: Q95931 ACC: How to Use the Query-by-Form (QBF) Technique Method 4: Use the InputBox() Function in a Custom ProcedureCreate a custom procedure that contains the InputBox() function, and then use the custom procedure in your query. For example, instead of the expression
use the expression:
where GetDate() is the following custom procedure in a module:
For more information about creating a custom procedure, please see the Microsoft Access manual, "Building Applications with Microsoft Access 97," Chapter 2, "Introducing Visual Basic," pages 57-81. STATUSThis behavior is by design. MORE INFORMATIONSteps to Reproduce Behavior
REFERENCESFor more information about the InputBox() function, search the Help Index for "InputBox function," or ask the Microsoft Access 97 Office Assistant.
Keywords : kberrmsg QryCrit |
Last Reviewed: April 17, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |