Simple Table Question

AWilderbeast

Registered User.
Local time
Today, 20:22
Joined
Sep 13, 2005
Messages
92
Ive done this before in College but it was along time ago and i cant remember what i did

Bus say I have a table with Businesses and i need each business to be able to have multiple records associated with it.

So i have two tables one named 'businesses' and one named 'orders' how do i make sure that when a business makes an order the data in 'orders' is associated witht the releveant business in the 'businesses' table
 
This should do the trick ...

Firstly you need a field which is common to both tables ie businessref then you need to create a one to many relationship between the business and orders tables.
 
You should be holding the primary key from the business table as a field in the orders table.

For data entry, you would usually handle this with a form and subform so that any time you enter an order in the subform, it will inheirit the PK of the business in the main form.
 
Take a look at the Northwinds database. It is a simple order entry system and will give you a starting point.
 

Users who are viewing this thread

Back
Top Bottom