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 / Forms / December 2007

Tip: Looking for answers? Try searching our database.

Option Group Where Clause

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jason - 04 Dec 2007 14:35 GMT
Thanks to help from this group I now have an option group on a from that
allows me to select which subform to display. The code to do that is list
below

Private Sub Frame51_AfterUpdate()
   Select Case Me.Frame51
       Case 1
           Me.EmployeeSubformcontrol.SourceObject = "Frm_EmployeePhone"
       Case 2
           Me.EmployeeSubformcontrol.SourceObject = "Frm_EmployeeCerts"
       Case 3
           Me.EmployeeSubformcontrol.SourceObject = "Frm_EmploymentData"
   End Select

End Sub

When I call the subform it returns all the data from the tbl. I would like
to limit the data to what is related to the Mainform. How can I add a where
clause to the above statement that would return the filtered information.

The Main form field is
Frm_EmployeeEditPage.QI

The subform’s field is

Frm_EmployeePhone.QINumber
Frm_EmployeeCerts.[QI Number]
Frm_EmploymentData.QI

Thank you
Klatuu - 04 Dec 2007 17:17 GMT
It would not be a where clause.
You use the Link Master Fields and Link Child Fields properties of the
subform control to identify the relationships between the main form data and
the subform data.  In your code, you will have to identify those properties
when you change subforms.
Signature

Dave Hargis, Microsoft Access MVP

> Thanks to help from this group I now have an option group on a from that
> allows me to select which subform to display. The code to do that is list
[quoted text clipped - 26 lines]
>
> Thank you
 
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.