N
Neil
Hello,
If you have a form and a sub form linked together with an ID autonumber with
1 to many relationship. If you then search for data in the sub form and lots
of records are found (results may look like in datasheet view of the form)
(in Sub Form)
lngMainID | Name
2 Neil
2 Peter
5 Mike
4 Phil
4 David
How would you code the SQL statement (the WHERE part) to show records 2, 4 &
5 in the main form only?
"SELECT * FROM tblMain WHERE lngID = " Me.lngMainID ' Assumes code is in
SubForm
obviously isn't going to work.....
I know there's a way but can I for the life of me remember what it is.
TIA,
Neil.
If you have a form and a sub form linked together with an ID autonumber with
1 to many relationship. If you then search for data in the sub form and lots
of records are found (results may look like in datasheet view of the form)
(in Sub Form)
lngMainID | Name
2 Neil
2 Peter
5 Mike
4 Phil
4 David
How would you code the SQL statement (the WHERE part) to show records 2, 4 &
5 in the main form only?
"SELECT * FROM tblMain WHERE lngID = " Me.lngMainID ' Assumes code is in
SubForm
obviously isn't going to work.....
I know there's a way but can I for the life of me remember what it is.
TIA,
Neil.