R
Resurrection
My database is coming along, but I am now stuck. My project tracks
employees, who are assigned to a work section, by each day, and what
"station" they are working at. I have a form which allows an end user
to input a work roster for each date. The form allows for a name to be
put into each work station field. This is not a problem. My unknown
variable that I can't seem to deal with is what to do with people who
are "off", training, leave, etc for each day. On one day, I might have
4 people who fall into this category. On the next, I might have 2. On
the next I might have 9. How do I, in theory, structure my database to
allow for a user to input on the form all the names of people who are
not assigned to a specific work station? And I want to store each name
as a separate piece of data so that I can quatify that data later, as
in during these dates, I had x number of people at training.
1) I thought I might want to just code a way to add fields to the work
roster table for each person, but that seemed like self abuse, as well
as I read through here that this is not the correct way to build a
database. "Fields are expensive, records are not" <-- See I am reading
and learning here!
2) So then I thought I might make a separate table for this info that
has a record for each date with a field for each person, but how to
deal with an unknown number of possible fields?
3) I have to be able to historically track the data, so having a
status field for each person and changeing it on a daily basis would
not work.
4) Building in a limited number of fields seems the "cheap" way to
solve the problem but that of course doesn't allow for the rare case of
needing more fields and it doesn't seem "professional" to me.
5) Building a table which has a record for name (with fields for date,
status, etc) seems feasible but also expensive. If I have 60 people
not "working" each day, in a year or more that seems like a ton of
records. And even in that case I would want to input a name in a text
box on the form, on update move that text to a list, and allow for
another entry in the same box until a list was built on the form or
some way to see all the names that were not "working".
Storing the unknown number of people who are not at any work station on
a given day as unique pieces of data (i.e. not multiple names in one
field) plus keeping track of this by date is my problem in a nutshell.
Any ideas? Maybe a way to add names to a listbox on the form, but then
how to store them individually?
employees, who are assigned to a work section, by each day, and what
"station" they are working at. I have a form which allows an end user
to input a work roster for each date. The form allows for a name to be
put into each work station field. This is not a problem. My unknown
variable that I can't seem to deal with is what to do with people who
are "off", training, leave, etc for each day. On one day, I might have
4 people who fall into this category. On the next, I might have 2. On
the next I might have 9. How do I, in theory, structure my database to
allow for a user to input on the form all the names of people who are
not assigned to a specific work station? And I want to store each name
as a separate piece of data so that I can quatify that data later, as
in during these dates, I had x number of people at training.
1) I thought I might want to just code a way to add fields to the work
roster table for each person, but that seemed like self abuse, as well
as I read through here that this is not the correct way to build a
database. "Fields are expensive, records are not" <-- See I am reading
and learning here!
2) So then I thought I might make a separate table for this info that
has a record for each date with a field for each person, but how to
deal with an unknown number of possible fields?
3) I have to be able to historically track the data, so having a
status field for each person and changeing it on a daily basis would
not work.
4) Building in a limited number of fields seems the "cheap" way to
solve the problem but that of course doesn't allow for the rare case of
needing more fields and it doesn't seem "professional" to me.
5) Building a table which has a record for name (with fields for date,
status, etc) seems feasible but also expensive. If I have 60 people
not "working" each day, in a year or more that seems like a ton of
records. And even in that case I would want to input a name in a text
box on the form, on update move that text to a list, and allow for
another entry in the same box until a list was built on the form or
some way to see all the names that were not "working".
Storing the unknown number of people who are not at any work station on
a given day as unique pieces of data (i.e. not multiple names in one
field) plus keeping track of this by date is my problem in a nutshell.
Any ideas? Maybe a way to add names to a listbox on the form, but then
how to store them individually?