Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Parameter query

Status
Not open for further replies.

plcman

Programmer
Feb 17, 2001
92
GB
Hi

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.

Thanks.

plcman
 
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
 
Hi fneily

Thanks for the reply, I don't have a combo on a form. I have a query with criteria as follows

Like "*" & [Enter Type]

When run the query shows a text box Enter Type. I would like this to be a list box instead of a text box and I just wondered if it was possible.

Thanks

plcman

 
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top