subform filter control

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
 
D

Damian S

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

Bill H.

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