Would like a drop down choice when using a parameter query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

1. I open a form using records from a parameter query. Is there a way to
get a drop down menu of choices for the responses in the parameter?
Ex: Query has Mdoule and I have the Parameter [Like: Module] or [Module:] is
Null

2. Is it possible for the parameter to use Wild Cards
Ex: A full Reponse would be VM/PCS - if the customer types *PCS* I would
like them to get teh VM/PCS choice
 
Hi,



Use a form, with the combo box. In the after update event of the combo
box, launch the query (rather than trying to launch the query first, then
getting a form with a prompt ). If you use DoCmd, or if you use the SQL
statement in a RowSource property of a list box, and like, you can use the
parameter name in the format: FORMS!FormName!ComboBoxName to refer to the
parameter captured as parameter.

The operator LIKE allows willcard.

? eval(" 'xyz' LIKE 'xy*' " )
-1


Some contexts assume DOS wildcard (* and ?) some other contexts assume
UNIX wildcard ( % and _ ).




Hoping it may help,
Vanderghast, Access MVP
 
Thank you - all the help text in the world never helped - but this worked
great!
The line you wrote about using the after update event to launch the query
really helped

Michel Walsh said:
Hi,



Use a form, with the combo box. In the after update event of the combo
box, launch the query (rather than trying to launch the query first, then
getting a form with a prompt ). If you use DoCmd, or if you use the SQL
statement in a RowSource property of a list box, and like, you can use the
parameter name in the format: FORMS!FormName!ComboBoxName to refer to the
parameter captured as parameter.

The operator LIKE allows willcard.

? eval(" 'xyz' LIKE 'xy*' " )
-1


Some contexts assume DOS wildcard (* and ?) some other contexts assume
UNIX wildcard ( % and _ ).




Hoping it may help,
Vanderghast, Access MVP




LoriO said:
1. I open a form using records from a parameter query. Is there a way to
get a drop down menu of choices for the responses in the parameter?
Ex: Query has Mdoule and I have the Parameter [Like: Module] or [Module:]
is
Null

2. Is it possible for the parameter to use Wild Cards
Ex: A full Reponse would be VM/PCS - if the customer types *PCS* I would
like them to get teh VM/PCS choice
 
Back
Top