If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Linking Tables
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 -- CowichanDave |
#2
|
|||
|
|||
Linking Tables
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. "cowichandave" wrote in message ... 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 -- CowichanDave |
#3
|
|||
|
|||
Linking Tables
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 -- CowichanDave "cowichandave" wrote: 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 -- CowichanDave |
#4
|
|||
|
|||
Linking Tables
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. "cowichandave" wrote in message ... 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 -- CowichanDave "cowichandave" wrote: 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 -- CowichanDave |
Thread Tools | |
Display Modes | |
|
|