mikenelena
Board Regular
- Joined
- Mar 5, 2018
- Messages
- 139
- Office Version
- 365
- Platform
- Windows
Our client data is maintained through a form (For the company), a subform (for branch offices), and an unbound subform container which binds with various forms depending on a selected tab control. The default tab is for Individual clients.
I have a search form that is opened from a button click event on the main form. The search form is for individuals. I would like to double click to filter directly to the selected individual, but being 3 levels deep, I'm struggling with the code. I have enough that the main form (Company level) will filter. I thought a series of successive code lines moving from company ---->Branch ----->Individual would work. Am I on the right track? Can anyone help me straighten out the coding to filter at the necessary level? The names are Clients3, frmBranches, and then the unbound subform container binding to frmAdjusters.
This code works for filtering to the correct company, but my efforts to filter farther have fallen flat.
Much thanks in advance to anyone that can help me out!
I have a search form that is opened from a button click event on the main form. The search form is for individuals. I would like to double click to filter directly to the selected individual, but being 3 levels deep, I'm struggling with the code. I have enough that the main form (Company level) will filter. I thought a series of successive code lines moving from company ---->Branch ----->Individual would work. Am I on the right track? Can anyone help me straighten out the coding to filter at the necessary level? The names are Clients3, frmBranches, and then the unbound subform container binding to frmAdjusters.
This code works for filtering to the correct company, but my efforts to filter farther have fallen flat.
Much thanks in advance to anyone that can help me out!
VBA Code:
Private Sub ctlFilter_DblClick(Cancel As Integer)
Forms.Clients3.RecordsetClone.FindFirst "[Client_ID] = " & Me.ctlFilter.Column(1, Me.ctlFilter.ItemsSelected)
Forms.Clients3.Bookmark = Forms.Clients3.RecordsetClone.Bookmark
End Sub