A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Linking Tables



 
 
Thread Tools Display Modes
  #1  
Old December 9th, 2009, 06:51 PM posted to microsoft.public.access.tablesdbdesign
cowichandave
external usenet poster
 
Posts: 12
Default 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  
Old December 9th, 2009, 07:04 PM posted to microsoft.public.access.tablesdbdesign
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default 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  
Old December 9th, 2009, 07:41 PM posted to microsoft.public.access.tablesdbdesign
cowichandave
external usenet poster
 
Posts: 12
Default 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  
Old December 9th, 2009, 09:18 PM posted to microsoft.public.access.tablesdbdesign
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 01:15 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.