rich.barry
09-23-2001, 09:03 PM
I have the following:
-2 tables (parent and child) connected by a 1-Many relationship
-a data entry form/sub form for entering data into the tables. The main form has the parent data and the sub form the child data
All quite simple so far.
If I go to Filter By Form and select a criteria for the parent and child part of the record, then Apply the filter, it works fine……but how do I replicate this in code.
Using a WHERE statement of Me.Filter =“TableParent.Field1 = ‘Criteria1’ AND TableChild.Field2 = ‘Criteria2’” does not produce the desired result.
It prompts for the value of TableChild.Field2, and even when you enter it, does not appear to use the value entered.
I’ve also tried various other naming conventions e.g. frmParent.Field1 + frmParent!sfrmChild.Field2, but it doesn’t appear to work either.
Any help would be appreciated.
Richard
-2 tables (parent and child) connected by a 1-Many relationship
-a data entry form/sub form for entering data into the tables. The main form has the parent data and the sub form the child data
All quite simple so far.
If I go to Filter By Form and select a criteria for the parent and child part of the record, then Apply the filter, it works fine……but how do I replicate this in code.
Using a WHERE statement of Me.Filter =“TableParent.Field1 = ‘Criteria1’ AND TableChild.Field2 = ‘Criteria2’” does not produce the desired result.
It prompts for the value of TableChild.Field2, and even when you enter it, does not appear to use the value entered.
I’ve also tried various other naming conventions e.g. frmParent.Field1 + frmParent!sfrmChild.Field2, but it doesn’t appear to work either.
Any help would be appreciated.
Richard