Subform - not showing records on opening

G

Guest

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
 
G

Guest

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.
 

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