Help with Relationships please

  • Thread starter Scott_66701 via AccessMonster.com
  • Start date
S

Scott_66701 via AccessMonster.com

I have multiple tables made out for parts of an invoice.

Table 1 for Customer Info; Table 2 for Shipping Info; Table 3 for Product
Info

How can I set a field in Table 1 (Invoice #) to combine with the other tables
so that I can do a search and see invoices from the invoice number.

Hope that makes sense.
 
M

Mike Painter

Scott_66701 via AccessMonster.com said:
I have multiple tables made out for parts of an invoice.

Table 1 for Customer Info; Table 2 for Shipping Info; Table 3 for
Product Info

How can I set a field in Table 1 (Invoice #) to combine with the
other tables so that I can do a search and see invoices from the
invoice number.

Hope that makes sense.

You need a table for the invoices themselves and one for the line items on
an invoice.
The invoice table will have a key field, fields that are unique to that
invoice (Date, comment, shipping method, etc.)
It will also have a CustomerID field and probably a shippingInfoID field.
These are foreign keys as they will hold the key fields from customers and
shipping.
The line items table will have a lineitemID, an Invoice number field and a
quantity field.

Depending on what you want to see you would build a query with the invoice
table relating the customer, shipping and line item tables in a one to many
relationship.

This should get you started.
There are samples in the Northwind database which are worth looking at.

Since these groups may disappear soon you may email me at
md dot painter at sbcglobal dot net

AFTER you have looked at Northwind.
Reading help on the basics of a relational database will also help.
 

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