Linking Tables

C

cowichandave

Doing a query on our accounting database for which am using 4 tables.

Client, Product, Detail, Serial number

Client is linked to Product by ClientID #
Product is linked to Detail by Invoice # (both keyed)
I have a date filter and this portion of the query works fine

I have tried different ways to link the serial table but the final query
only displays those results that have serial numbers. Not every invoice has a
serial number. I cannot modify the accounting program tables. So instead os
showing me 2000 records which is correct but adding the serial table limits
the query to 35 records. I need the 2000 records to include serial number
data. What am I missing?

I have tried linking the Detail table: linecode with the Serial table:linecode
 
J

Jeff Boyce

Without seeing the SQL statement, I can only guess ...

If you are using an "equi-join" (show all of the fields when the tables have
matching IDs), you'll only see the records when there are matches.

If you use a 'directional' join (my term), you can tell Access to show you
ALL qualifying records from Table1, and ANY data from Table2 if there is a
match.

In your SQL statement, are the terms "LEFT" or "RIGHT" preceeding "JOIN"?

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.
 
C

cowichandave

Figured it out. Have to learn to read more posts. Sometimes the answer is not
in the header but answered within a post that may be unrelated.

This group is terrific. Thank you all
 
J

Jeff Boyce

If you'll post your solution, someone else looking for an answer may be able
to use yours...

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top