Simple question about an orders table

GopherUK

Active Member
Joined
Jan 23, 2009
Messages
473
Hi,

I was just wondering what is the best way to create an "orders" table so that I can enter multiple items in to a single order and have it so they will be all IDed as the same order in the table. Given that autonumber wont allow duplicate IDs, is the answer simply to have the form have fields to allow multiple entiries for products and then have corresponding fields in the table. Then just hope that the number of different items ordered does not exceed the number of fields?

Is there another solution? I can't see how else it would be possible to create a schema that would allow a query to get the details of all the items in a single order if they do not have the same primary key?

Thanks.
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
You are going to need to have two tables. One with the gross information about the order and a second with the detailed information about the order. Look at this video and it will demo how to set up the form and sub form. You will probably want to not use a query as your record source for the subform as Mike does in the video, but the detailed table so that you can enter data appropriately. You should be able to glean enough info here to build your tables and then your forms.

http://www.datapigtechnologies.com/flashfiles/subforms1.html

Alan
 
Upvote 0
Out of interest, are there any books or video courses on practical database design in Access you would recommend? I would like to sharpen my skills on real-world examples.
 
Upvote 0
Suggest you try to google MS Access Tutorials. You will find hundreds. Pick one or two and follow them.

Alan
 
Upvote 0
Out of interest, are there any books or video courses on practical database design in Access you would recommend? I would like to sharpen my skills on real-world examples.

What I would recommend is studying Database Normalization theory. This applies to all relational database, not just Access. Some of the best material I have read was on sites not related to Access.

Here is a great start:
Database - Planning/Normalization
 
Upvote 0
Boyd: Great Link. Added to my favorites as I had not seen that one before.

Alan
 
Upvote 0
I've done a lot of reading now and I think I am coming along leaps and bounds.

One question I have... if you are using a database that has information in it regarding the stock a company has, is it better to...

a) Have a field in the table holding the information about the different items in stock that holds the actual number of items, which I assume would be adjusted using a macro when recording a new delivery of the item or shipping an order of the item in the database.

or...

b) Have a form/report that calculates the total in stock by subtracting the total number of that item shipped from the total number of that item delivered.

Or they both acceptable by the God of RDBMS?
 
Upvote 0

Forum statistics

Threads
1,224,606
Messages
6,179,862
Members
452,948
Latest member
UsmanAli786

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top