Repeat values in multiple records

D

DumbWithData

I am making a form for tracking items completed on a particular date. There
would be 4+ fields: date, personnel, location, item, etc. I would like a
user to be able to enter the date and personnel for the first record and then
have these date and personnel values repeat for each additional record added
to the form during that use. Does anyone have any suggestions? Thanks for
the help in advance.
 
T

tina

sounds like you may have a normalization issue. if you have multiple records
with the same date, and same personnel (i'm guessing you mean a person, in
this context), and each record has a different location and/or item - then
suggest you review your table structure; you may have a one to many
relationship here, as: a specific person on a specific date may need many
location/item records entered. if that's the case, then commonly you would
split the location and item fields into a child table, with a foreign key
field linking the records back to the primary key of the date/personnel
table. if primary and foreign keys, and parent/child tables are not familiar
to you, recommend you STOP, close your database, and study up on relational
design principles before you do any more work on the database. for more
information, see http://home.att.net/~california.db/tips.html#aTip1.

hth
 
D

DumbWithData

Tina:
I do not understand how this is a normalization issue. A record consists of
the date, the item worked on, the location the work took place, and the
person verifying the work. One person will have multiple items in multiple
location on the same date. The primary key for a record would be the date,
location, and item fields. Please explain...
 
T

tina

i already explained as well as i can, in my previous post. and if you read
that post again, you'll see that i said "you MAY have a normalization
issue", and "you MAY have a one-to-many relationship". it's up to you to
determine if that's the case or not. good luck with it.
 
D

DumbWithData

Can anyone explain this? I believe that I understand the normalization issue
being raised, but is this splitting necessary and/or a better idea? It seems
that it is a bit cumbersome given that each date/personnel combination will
probably only apply to 4-5 records. What would be the benefit of such a
split?
 
G

Gina Whipp

DumbWithData,

If your people are using the same front end (form) at once to enter
information then aside from everything else you most likely will face
corruption issues. Each person entering data should have their own front
end and link to the back-end. It is not the amount of records they will
enter it is the fact that they sound like they will be sharing one form to
enter the data. This would be problem number two... because problem number
one sounds like what Tina described you have a normalization issue which
should be dealt with immediately.

Problem number one, how can you make date a Primary Key because if I sell 4
widgets today and Tina sells four widgets today and the date can only be
entered once does that mean only 1 widget gets entered? So 7 people are
without their widgets... oh well, they probably didn't need them anyway! I
digress... You need to use something else as Primary Key and since you
don't care what it is, at least that is the impression I get, then use
AutoNumber. HOWEVER, if this is the only table you are ever going to use
and aren't interested in anything else then Happy Coding...

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top