Hello - I think I am close but can't quite get it!
I have a database that tracks corporate board members, so each record line includes an organization (Org)name and the last name of the member (LastName)..amoung other junk.
What I want to write is a statement that says "find the record lines that have a lastname of "smith" and a lastname of "jones" where the organization is the same (ie.. they both served together in the same Org). This is what I've done before to make this kind of think work..
SELECT tblMain.LastName, tblMain.Org
FROM tblMain
WHERE Org IN (Select Org from tblMain WHERE tblMain.LastName="Smith"
AND
Org IN (Select Org from tblMain WHERE tblMain.LastName="Jones"
when I run it it seems to ignore the name qualifier. I suspect this has something to do with the fact that what's in my Org field is comming from a dropdown listbox - could that be messing it up, since the value isn't actually typed in? If so, is there a way around this to make it work?
Thanks much,
Bucky [sig][/sig]
I have a database that tracks corporate board members, so each record line includes an organization (Org)name and the last name of the member (LastName)..amoung other junk.
What I want to write is a statement that says "find the record lines that have a lastname of "smith" and a lastname of "jones" where the organization is the same (ie.. they both served together in the same Org). This is what I've done before to make this kind of think work..
SELECT tblMain.LastName, tblMain.Org
FROM tblMain
WHERE Org IN (Select Org from tblMain WHERE tblMain.LastName="Smith"
AND
Org IN (Select Org from tblMain WHERE tblMain.LastName="Jones"
when I run it it seems to ignore the name qualifier. I suspect this has something to do with the fact that what's in my Org field is comming from a dropdown listbox - could that be messing it up, since the value isn't actually typed in? If so, is there a way around this to make it work?
Thanks much,
Bucky [sig][/sig]