I am assuming you truly mean InputBox command here rather than text box.
Create a global variable and a function in a database module: Global vInputBoxData as Variant
Function InputBoxData()
InputBoxData = vInputBoxData
End Function
Then in your code use this:
vInputBoxData = InputBox("Please enter criteria"
DoCmd.OpenQuery "qryYourQueryName"
The criteria row for the column/field in your query should look like this as you are making a Function Call: InputBoxData()
This should do it for you.
Bob Scriver Want the best answers? See FAQ181-2886 Nobody believes the official spokesman... but everybody trusts an unidentified source.
Author, Bagdad Bob???
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.