View Full Version : Order list / Receipt: Concept = OK, Implimentation = Help


cochese
04-07-2011, 02:24 PM
I've looked at the 2007 version of the Northwind sample database and it's just too large and complex for me to break down. I understand the concept of how this is done (I think) at the table and relationship side, but I'm having trouble understanding how it is implemented with forms. Obviously I'm a beginner.

While the order list / receipt is the concept most used, I'm actually trying to repeat the concept for two different ideas. 1) a system to log expenditures with keywords attached to them (e.g. a cell phone payment would be tagged with the keywords bill and phone) and 2) track shoplifting (log the incident along with a record of every item stolen).

I'll use the 2nd idea for the rest of this post. I believe the structure would be laid out like so:

+ a table to record the details of the theft
- record id (PK)
- date of
- in store...
- in department...
- offender id (FK)

+ a table to record a list of the items stolen
- auto id (PK)
- record id (FK)
- item description
- quantity stolen
- item retail price

+ a table to record information about the offender
- offender id (PK)
- offender's last name
- offender's first name
- etc

If this is correct, lets move on to my real confusion.

1) can all of this information be put in from one form? Ex: at the top is where the offender's information goes, then in the middle is the theft details, and then at the bottom is a list of all the items stolen.

2) if it is possible to have the theft details and the list of items stolen on one data entry form, how does the record id (identifier of the overall theft entry) get thrown into the correct field for every row of items being logged. Ex:

The first record is being entered, so it has the record id of 1. Then on the form is
a sub form (I guess) that is in data sheet view, which is where the 5 items being
stolen for this 1 incident get logged. Here an auto id would be given for each
record (i.e. each stolen item) entered in the data sheet view, however how does
the record id (remember, it's number 1) get entered for each of the 5 records in
order to make the association between record 1 having these 5 items stolen?