A family of Microsoft relational database management systems designed for ease of use.
Private Sub List1_Click()
Me.Subform1.Form.Filter = "Inv_Det_Code = " & Me.List1
Me.Subform1.Form.FilterOn = True
End Sub
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
bound column - Code
the Jobs_Invoices query has 1-M relationship where Jobs has the primary key (Code) and Invoices has the foreign key (Inv_Det_Code).
The code below does not filter the subform when the list is clicked. Is the syntax incorrect?
Private Sub List1_Click()
Me.Filter = "([Me!Subform1.Form!Inv_Det_Code])" = " & Me.List1.Value"
Me.FilterOn = True
End Sub
A family of Microsoft relational database management systems designed for ease of use.
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
Answer accepted by question author
Private Sub List1_Click()
Me.Subform1.Form.Filter = "Inv_Det_Code = " & Me.List1
Me.Subform1.Form.FilterOn = True
End Sub
No luck. Do I bound the main form, subform, and list box all to the same Query? then Master link the list field and child link the subform field?
Also, my listbox is showing multiple records with the same job number - where I only wanted unique job #s for the list box to click and display all invoices in the subform from that job.
The listbox, which has a value of JobCode.
What would I use as the LinkMasterField? Does the Listbox need the same control source as the subform?
Would it be easier to set the subform control's LinkMasterFields and LinkChildFields?