Drop down parameter Query

  • Thread starter Thread starter Rodney James
  • Start date Start date
R

Rodney James

In a Parameter Query.

Is there a way to make the choices a drop down box instead of haveing to
type in? If so how do you do that?
 
Hi Rodney

Yes.

You could make a popup form (call it frmSelector) and on this have only one
field of a combobox (call it cboSelector. Fill the combo with the criteria
either from a form, query, table or just type it in if it’s the same all the
time.

Then in your query use this as the criteria for the column you are filtering

[Forms]![frmSelector]![cboSelector]

Of course you can alter frmSelector and cboSelector if you want to
whatever you normally use.

A bonus to this would be that you could query on a number of criteria using
a simply “query by form†if you put some more combos on your form and if you
really want to mess about you could make those combos casscade. Press F1 and
search on QBF for more info.

Hope this helps
 
Back
Top