Query "And" on same field

whitedove--you need to go into design view of the query I provided you and replace the field called ID with the one called Table1ID.

vba--he wants a query to identify records with both Home and Office records in Table2. Yours will pick up those with multiple Home records and no Office records (and vice versa).
 
Ah alright, I understood it differently.

I'll take a back seat now that you're back online.
 
vba - I put your SQL code in the SQL view and still returned ID with no records.

plog - thank you for the tip, your solution actually worked! It showed table1ID with record 1 which what I wanted. But why the location column is hidden? I tried adding the location to the query in design view when I ran the query it returned empty. Is there a way to show location column?
 
There is, but it won't be what you want. I mean you want to show a value that doesn't exist in your underlying data.

what you can do is add a calculated field with this code:

LocationText: "Home And Office"

It's just hard coding a string into your query.
 
Thank you Plog. I am just wondering how and where to start learning SQL expressions and VBA?
 

Users who are viewing this thread

Back
Top Bottom