ACC2000: InputBox Error: Function Isn't Available in ExpressionsID: Q198955
|
Moderate: Requires basic macro, coding, and interoperability skills.
When you use the InputBox() function in a query, you may receive the
following error message:
Function isn't available in expressions
The following four methods enable you to work around this behavior.
[Enter a Date]
Then on the Query menu, click Parameters and type the parameter again, along with its associated data type, in the Query Parameters dialog box.
Forms![Form Name]![Control Name]
Eval("InputBox(""Enter a Date"",""Title line"",#1/1/98#)")
-or-
Eval("InputBox('Enter a Date','Title line',#1/1/98#)")
GetDate()
Function GetDate()
GetDate = InputBox("Enter a Date","Title",#1/1/98#)
End Function
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.Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article.
Query: ListOrders
-----------------------------------------------------
Type: Select Query
Field: OrderID
Table: Orders
Field: CustomerID
Table: Orders
Field: OrderDate
Table: Orders
Criteria: InputBox("Enter a Date","Title",#1/1/98#)
Click More Help in the error message box and note that you receive the second error message.
For 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
Version : WINDOWS:2000
Platform : WINDOWS
Issue type : kbprb
Last Reviewed: May 13, 1999