Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

One Order/Multiple Products

Status
Not open for further replies.

ImASig

Technical User
Jul 24, 2000
20
US
I've been messing with Access long enough now that I should know this but for some reason this one is kicking my butt.

I have an Access database with mutliple tables:

Customers
Products
Orders

I need to be able to create an order, using autonumber for order id, that can have many products on it for invoicing reasons. I thought the best way to go about this would be to do a dual primary key between order id and productid with customer id being a foreign key.

OrderNo ProductNo
_______ _________
1 1
1 2

However each time a new record is made I cannot duplicate my order id because of autonumber.

Can anyone point my in the right direction on the best type of relationship to use with this situation. I'm sure this is a common setup in a database and this question has been answered hundreds of times but I cannot seem to pull off the right search string here or on google.

So any suggestions or references to an existing thread would be much appreciated.
 
HAve you tried to take a look at the Northwind database ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Good Call. I forgot about that sample database. Let me check that out. In the mean time nobody should waste their time on this thread unless I cry for help later :).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top