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.
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.