subform filter control

  • Thread starter Thread starter Bill H.
  • Start date Start date
B

Bill H.

For the after update event of a combo box (named "classcombo") on the main
form Frm_Main, how do I set the filter control on the subform,
Frm_Main_subform.filter?

I'd like to say Forms!Frm_Main_subform.filter = "PriKey = " &
classcombo.column(0)

Thanks
 
Hi Bill...

Close... you missed a bit in the middle of it. The syntax to set a filter
on a subform is as follows:

forms!MAINFORMNAME.NAMEOFSUBFORMCONTROL.form.filter = FILTER
forms!MAINFORMNAME.NAMEOFSUBFORMCONTROL.form.filteron = true

Of course, if you have your main form and subform set up correctly, there
should be a link between the two forms that will enforce this filtering for
you automatically.

Hope that helps.

Damian.
 
I'll give it a try.

Normally, yes, subform is enforced via link to main form, but in this case
I'm using UNION queries in the subform, and I can't seem to get the link
working the way I expect it to. :-)

Yeah! It works. Thanks!
 

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

Similar Threads

many to many 1
Convert "OutputTo" to vba code 1
dlookup 9
Access Daily Entry with multiple entries per field 0
subforms 5
Filtering subform 6
Refresh subform 2
Access Reference Subform's Control 0

Back
Top