Subform - not showing records on opening

C

cinnie

I have a main form with a combobox that I use to filter records in a subform.
When the main form opens, the combobox is empty, but the subform shows all
its records unfiltered. What is the best way to have empty records in the
subform until a combo selection is made?

thanks
 
D

Damian S

Hi cinnie,

If you have the query that is in the subform explicitly reference the value
in the combo box, no records will show when there is no selection. ie: Have
a where clause in your query like "where [IDFIELD] = forms!FORMNAME.COMBONAME"

Then, in the after update event of your combo box, you simply need to
requery the subform like this: me.SUBFORMNAME.form.requery

Hope this helps.

Damian.
 
Top