Hi again
Hmmm...OK now I am more confused.
Why wouldn't a field in the employee table be for what shift the employee
belongs too?
I may have misunderstood –
I assumed that “shift†referred to a given period between 2 time – ie. From
[StartShift] to [EndShift]. Sorry
However if there are more than one person on the “shift†then you really
should create a separate table for this.
As an example (from your post). If John and Sally and Mike are all on the
same “shift†then you will record the shift details in each of their records.
There is no need for this. Also it may be that even though the 3 of them
are on the same shift – they “may†have different work patterns, hourly
rates, or John may not turn up for work one day, etc, etc, etc. As you can
see you need one table for the employees and another one for the “shiftâ€
details.
You will almost certainly be better putting in a linking table (as there are
many employees and many shifts) this is what is known as a many to many
relationship.
Using this method you could record which shifts were worked by which
employees.
Name the table tblLink and have a minimum of 3 fields
LinkID
EmployeeID
ShiftID
TaskID (see last point for this)
Use the relationship page to create the relationships for you.
I am trying to track how many hours each employee worked on each task that day.
For this you will need at start time and end time. In your query (and so
also on your form) you “could†insert the hours work by each member of the
shift (don’t forget that with a relational database you can allocate
different “hours worked†to each employee – of course you “could set as a
default that everyone worked the same BUT data base have a habit of growing
it is better to build-in options that you “may†need in future from the
outset if you can.
So I am trying to make a form that lists all 25-30 employees (visible all at
once) with about 10 fields of different "tasks" they do. (order picking,
truck loading, trailer unloading, cleaning, .ect.
You could use (with your new relational data format) a main form with the
shift details and then a sub-form detailing how worked on that particular
shift. This way if someone fails to turn up for their shift you can easily
note this against their name.
There are many many way of denoting with task an employee has done during
the shift – a couple of common ones would be a dropdown list that you can
select from, or (not as good for many items as it would make the form look
slightly bloated) you could use check boxes.
I would suggest that you could look at a toggle group (if each employee only
performs one task during each shift – as you can see I don’t understand what
you’re trying to do. I spend a great deal of time with clients just chatting
about the methods prior to even starting a new d Base).
Each employee that was present that day would end up with a total of 8 hours of time in 1 or more task.
This would get entered each day for all employees per shift.
Again you could use a StartTime / EndTime for each task (don’t forget – that
at the moment this is all you want but as it’s very simple to do you may as
well build in this functionality at the start).
1st I am having trouble displaying ALL the employees for the shift on 1 form. with fields for each employee for the tasks.
You could use a subform for this with the format set to Datasheet this way
you can display from 1 employee per shift up to …. Well let just say many
thousands.
Maybe I am not thinking of this correctly.
Yes you are. You are looking at a problem and trying to work out the best
way to solve it using the available resources (in this case an access data
base.
Just one point
Assuming that (now or in the future) you may alter the “tasks†that
employees perform during the “shifts†– I would have a tblTask with a link to
the shift table to enable you to allocate the tasks on to the shifts
Have a look at Allan Brown’s excellent tips on all of these subjects
http://allenbrowne.com/tips.html
He also has a school type project here
http://allenbrowne.com/casu-06.html
Which I think will be a great help to you
--
Wayne
Manchester, England.
Not an expert.
Enjoy whatever it is you do.
Sydious said:
Hmmm...
OK now I am more confused.
Why wouldn't a field in the employee table be for what shift the employee
belongs too?
I am not trying to track wages. I am trying to trck how many hours each
employee worked on each task that day.
So I am trying to make a form that lists all 25-30 employees (visable all at
once) with about 10 fields of diffrents "tasks" they do. (order picking,
truck loading,trailer unloading, cleaning, .ect.
Each employee that was present that day would end up with a total of 8 hours
of time in 1 or more task.
This would get entered each day for all employees per shift.
1st I am having trouble displaying ALL the employees for the shift on 1 form
with fields for each employee for the tasks.
Maybe I am not thinking of this correctly.