Two tables in my MSAccess database: MainT, and SubT which is linked to MainT via a one-to-many join.
I use a listbox (Listbox1) on a form (Form1) which opens a new form (Form2) on double-click. On that second form (Form2) there is also a second listbox (Listbox2).
The issue I am having is that Form2 displays the correct record from MainT as selected from Listbox1 on Form1 - but the Listbox2 on Form2 is supposed to show only records from SubT which match the record from MainT.
Instead Lisbox2 is displaying all the records in SubT and is not filtering based on those records in SubT that match the record from MainT being displayed in the form (Form2)
The double-click command from Listbox1 to open Form2:
DoCmd.OpenForm "Form2", , , "TrackerPTID =" & Me.ListBox1, , acDialog
So my question is how I can take the value from Form1/Listbox1 that gets Form2 to open to the correct record and pass that to the Listbox2 so that it uses that same value to filter Listbox2 to the records on SubT that match the record on MainT
Thanks in advance!
R