The information in this article applies to:
SYMPTOMSModerate: Requires basic macro, coding, and interoperability skills.
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, 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, click Microsoft Access Help on the Help menu, type "parameter query" in the Office Assistant or the Answer Wizard, and then click Search to view the topic. Method 2: Obtain the Information from a FormIf the information that you want to type in the input box can be obtained from a form, you can point the query directly to the form field containing the criteria. For example, use the following expression as a criteria in the criteria line:
Method 3: 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, use the expression:
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, use the expression
where GetDate() is the following custom procedure in a module: For more information about creating custom procedures, click Microsoft Access Help on the
Help menu, type "module, create" in the Office Assistant or the Answer Wizard,
and then click Search to view the topics returned.STATUSMicrosoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. MORE INFORMATIONSteps to Reproduce Problem
REFERENCESFor more information about InputBox() function, click Microsoft Access Help on the
Help menu, type "InputBox" in the Office Assistant or the Answer Wizard,
and then click Search to view the topic. Additional query words: error
Keywords : kberrmsg QryCrit |
Last Reviewed: May 13, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |