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

Combo box with a query a newbie question

Status
Not open for further replies.

gw73

MIS
Dec 30, 2001
16
0
0
US
Hi
I would like a combo box to come up so the user can pick a search criterion. I've searched the threads and this is what I have done so far. I created a form with the combo box and put a run query command button on it. It works fine if I run the query from the form. I have two questions, first is there any way to have the combo box form close by itself after making a selection and if possible pop up again after the query is run to make another selection. Second why when I run the query from the Data window the parameter box pops up, instead of the combo box. The code I entered in the criterion =[forms]![search]![cboSearch], comes up as the header in the parameter dialog box.

Thanks for any help
Gary
 
If your form is not loaded, your query can't find the value for
Code:
=[forms]![search]![cboSearch]
. (That is why you are getting a parameter prompt). Either run the query from the form, or make sure the form is open when you run the query.

As far as having the combo-box form closing itself, you can set it's visible property to
Code:
=false
when you run the query - that way, the form is still open and your combobox parameter is still available.

 
Thanks for the information you've been a great help.

Gary
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top