How combo box row source query be conditional on another control

D

Don Rudd

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

Ofer

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
 
D

Don Rudd

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.
 
Top