combo boxes for paramaters

  • Thread starter Thread starter Robert Raley
  • Start date Start date
R

Robert Raley

I have query that uses parameters. I would like to use a combo box to fill
in the parameters. I have looked in help and have not found anything.
Maybe I am searching incorrectly.

I use combo boxes all of the time. Really do not know why I am so dense on
this one problem.

Please give me some idea how to find help on this matter. I am sure that it
exist.

Thanks

Best Regards

Bob
 
I have query that uses parameters. I would like to use a combo box to fill
in the parameters. I have looked in help and have not found anything.
Maybe I am searching incorrectly.

I use combo boxes all of the time. Really do not know why I am so dense on
this one problem.

Please give me some idea how to find help on this matter. I am sure that it
exist.

Thanks

Best Regards

Bob

Create a new (or use an existing) Form. Add the combo box to the form.
Add a command button to the form.
Code it's Click Event:
DoCmd.OpenQuery "QueryName"
DoCmd.Close acForm, Me.Name

In the query, as criteria for that field, write:
forms!FormName!ComboName

Open the form; select the value in the combo box; click the command
button.
The query will display the filtered records.
The form will be closed.
 
Thanks Fred,

Works like a charm. How about if I want to do a form for the query results.
And have that form as a sub form for the main form with the combo box.

In other words have the query results shown in the same form as he combo
box.

Thanks again for all of the help.

Regards

Bob
 
Thanks Fred,

Works like a charm. How about if I want to do a form for the query results.
And have that form as a sub form for the main form with the combo box.

In other words have the query results shown in the same form as he combo
box.

Thanks again for all of the help.

Regards

Bob

Make the query the Record Source for the form.
 
Back
Top