How combo box row source query be conditional on another control

G

Guest

I want to make my row source query conditional on the (dynamic) value of
another control in my form. Pls help.
 
G

Guest

Just filter the query in row source of the combo with the field in the form

Select * From MyTable Where MyField = forms![FormName]![FieldName]

On the after update event of the field in the form referesh the source of
the combo,
Enter the code
me.comboName.requery

Also if you move between records in that form, then run the requery for the
combo in the on current event of the form
 
G

Guest

Thanks for your help, Ofer.

Ofer said:
Just filter the query in row source of the combo with the field in the form

Select * From MyTable Where MyField = forms![FormName]![FieldName]

On the after update event of the field in the form referesh the source of
the combo,
Enter the code
me.comboName.requery

Also if you move between records in that form, then run the requery for the
combo in the on current event of the form

Don Rudd said:
I want to make my row source query conditional on the (dynamic) value of
another control in my form. Pls help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top