Filtering a subform based on another subform

dark11984

Registered User.
Local time
Today, 13:40
Joined
Mar 3, 2008
Messages
129
Hi,
I've searched loads of forums today trying to find a solution to this but am finding myself getting confused and not getting anywhere.

I want to be able to double click a record on Mainform1!Subform1 which then opens Mainform2!Subform1 and filters for the record that I double clicked on Mainform1!Subform1.

Any suggestions would be much appreciated.

Thanks
 
Does Mainform2 not drive subform1? That is, are they not linked?
 
The two subforms are completely seperate, they have two different record sources. So I probably should have named the examples differently i.e. Mainform1!Subform1 and Mainform2!Subform2

Also both Mainforms are unbound so there is no link between the subforms.
 
I understood what you meant. This was what I was after.
Also both Mainforms are unbound so there is no link between the subforms.

You can use the Filter and FilterOn properties of the subform to filter it.

So after opening Mainform2, you can do something like this:
Code:
... open MainForm2 here ...
Forms!MainForm2!Subform2.Form.Filter = "ID = " & Me.ID
Forms!MainForm2!Subform2.Form.FilterOn = True
 

Users who are viewing this thread

Back
Top Bottom