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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Drop down list in parameter query

Status
Not open for further replies.

mike1005

Technical User
Jun 26, 2001
5
US
I am familiar with developing querys that prompt users for input, and I also kow how to to a form with a drop-down list to make selections.....

I would love to develop a form with drop-down lists, to fill the parameters of a query that I've written...I'm sure this is possible, but I'm not seeing how. Could anyone point me in the right direction???

Thanks so much.
 
Look at the combo.value for you combo box. You can store it in a variable to use in a query.
 
In the criteria of your query enter [forms]![FormName]![ControlName] where FormName is the name of the form you are using and ControlName is the name of the DropDown Box or other control that contains the value for the query. You can then fire the query from a command button or from the After Update event of the control. Terry
 
Hi,

You can refer to the listbox control directly in your query. For example:
If you have a listbox filled with customers. You want to run a query using a customerid
as criteria. Have the listbox bound to customerid. In your query insert into the QBE grid the following: forms!MyFormName!lstCustomer

Have a good one!
BK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top