Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / November 2006

Tip: Looking for answers? Try searching our database.

subform filter control

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bill H. - 02 Nov 2006 06:12 GMT
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

Signature

Bill

Damian S - 02 Nov 2006 06:41 GMT
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.

> 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,
[quoted text clipped - 4 lines]
>
> Thanks
Bill H. - 02 Nov 2006 07:55 GMT
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!

> Hi Bill...
>
[quoted text clipped - 20 lines]
> >
> > Thanks
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.