>I have a 2003 db with multiple tables that all refer to each other. My
>tblStoreData has fields like StoreNumber, StorePhone, StoreName, OwnerID,
[quoted text clipped - 19 lines]
>123 Alpha Store Joe Blow Owner
>123-456-7890 Central Mountain
Marshall,
Thanks for replying. My db is pretty much written in VBA, can I still use
the query builder to put it all together? I have a previous post titled
"Inner Join Problem" dtd 10/24. It has the code I tried to write to
accomplish this.
Thanks,
Darhl
>>I have a 2003 db with multiple tables that all refer to each other. My
>>tblStoreData has fields like StoreNumber, StorePhone, StoreName, OwnerID,
[quoted text clipped - 28 lines]
> connecting lines are between the related fields. Rhen drag
> the desired fields down to the query's field list.
Marshall Barton - 29 Oct 2005 17:31 GMT
To get all those parenthesis in the right place I would use
the query design window to create and test the query. Once
that is working, then Copy/Paste it into your code and add
the quotes and line continuations.
I am not going to set this up for testing, but I think it
will probably end up looking more like:
strSQL = "SELECT * FROM ((tblStoreData " _
& "INNER JOIN tblOwners " _
& "On tblStoreData.DistrictID=tblDistrict.DistrictID) " _
& "INNER JOIN tblRegion " & _
& "On tblStoreData.RegionID = tblRegion.RegionID) " _
& "INNER JOIN tblDistrict " _
& "On tblStoreData.OwnerID = tblOwners.OwnerID"

Signature
Marsh
MVP [MS Access]
>Thanks for replying. My db is pretty much written in VBA, can I still use
>the query builder to put it all together? I have a previous post titled
[quoted text clipped - 33 lines]
>> connecting lines are between the related fields. Rhen drag
>> the desired fields down to the query's field list.
Darhl Thomason - 30 Oct 2005 04:30 GMT
Thanks Marsh!
That was the ticket. I didn't know I could use the query tool then turn it
into SQL. That worked great. I have already used that for some of my other
stuff as well.
Thanks again for the great tip!
Darhl
> To get all those parenthesis in the right place I would use
> the query design window to create and test the query. Once
[quoted text clipped - 54 lines]
>>> connecting lines are between the related fields. Rhen drag
>>> the desired fields down to the query's field list.