Is it possible to have a combo or list box instead of a text box in a parameter query. If so, how? I would need the drop down contents to be based on the contents of a table.
Do you mean you have a combo or list box on a form and you want the selection to be your query prompt? On the criteria line beneath the appropriate field type
Forms![YourFormName]![Comboboxname]
Substiture YourFormName and Comboboxname
You could create your own. Create a form with the Detail section only. The have just a combobox on it with some label like "Please select". Size your form to whatever size you want and then set the following properties:
Scroll Bars = Neither
Record Selectors = No
Navigation Buttons = No
Dividing Lines = No
Border Style = Thin
Then put on the AfterUpdate event of the combobox,
DoCmd.OpenQuery "Query Name"
And on the criteria line of your query, again put
Forms![YourFormName]![ComboboxName]
For this to work, the little form must stay open. But you can hide it, or close it when the query closes.
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.