Full Version: Queries and relationships?
UtterAccess Discussion Forums > Microsoft® Access > Access Queries
Al3x
Hi i seem to be having a issue, i have a query which will return ALL the results i want, when i add another table to the query it returns LESSS, if i add more tables it gets less and less.

Ive figured out the issue must be related to how the tables relate to one another and the results do not return if there is no data in other tables

for example:

Customers

Appointments

Sales

I can create a query to return ALL customers, if i add appointments table with NO appointments in, i loose nearly all my customers from the query.

Is there a way to return ALL customers even if they dont have any sales or appointments?
DougY
You need to change your join from an Inner Join to a Left Join.

Inner Join returns only matching records.
Left Join returns all records from table A, and any matching records from table B.

HTH
Al3x
I followed what you said and now it saying that the sql statemnet could not be exected because it contains ambiguous outer joins.
DougY
Can you post your SQL?
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.