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.
> I am fairly new to Access and am working on a project for work. I know how to
> get around in access but when I try to build the database I get all confused.
[quoted text clipped - 32 lines]
> on my own.
> Help!????
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

Signature
Wayne
Manchester, England.
Not an expert.
Enjoy whatever it is you do.
> Hmmm...
> OK now I am more confused.
[quoted text clipped - 49 lines]
> > on my own.
> > Help!????
Sydious - 13 Aug 2006 20:03 GMT
Hi. Thanks for the help your giving me.
Head is still swimming.
Ok I think I am getting closer. I have a DataSheet style form that lists all
the employees, with a sub form that you can open for each and enter Task
type, Start Time, End time.
How do I go about making it for 1 day at a time?
Some of the people who will be using this are slow learners as far as
computers go. So I want to make this as easy as posible for them.
1 form for them to fill out for each day. All employees listed and Task
type, and times. An employee might do more then 1 task each day. Maybe up to
5 or more tasks.
Think the data sheet view with the subform +'s might be to nuch. Would like
a cleaner style of entry. Again only displaying the 1 day's data at a time.
> Hi again
>
[quoted text clipped - 138 lines]
> > > on my own.
> > > Help!????
Wayne-I-M - 13 Aug 2006 20:43 GMT
Datasheets are a little bit weird sometimes to work with if you’re not to
them so (if it was me this is what I’d do).
Create a new query.
Right click the design grid (they blank bit at the top) and select view Show
Table.
Double click the Employees table and the shifts tables.
Close the properties box.
If here is a relationship shown between the tables (a line between the two)
– right click and delete it.
On the Employee Table click and drag the EmployeeID and drag it across to
the EmployeeID that is in the Shift table (if it isn’t then go back to the
table design and put it in)
Bring the fields that you want in your form (when you make it) like Name,
shift, task, etc.
Save the form and close it.
Create a new form. Call it frmShifts. Save.
Click View (at the top of the screen) and then select FieldList
Very Important bit - - - Only bring in the fields that are applicable to the
“shift” not the employees. Add these to the form Header - leave the details
section blank for the moment.
Shift Name.
Shift Date.
Shift Location
Ect.
BUT most importantly you MUST include ShiftID.
Save the form and close it.
Create a new form. Call it frmEmployees
Do the same as you did for the frmShift but this time bring in only those
fields that are applicable to the employees.
All these fields will normally go into the Detail section. Put them in 1
line next to each other. Don't have too much space above or below the fields
in the detail section.
In the “Header Section” you MUST put the ShiftID and the ShiftDate. (you
can add other stuff if you want but the ShiftID is very important). A nice
Lable is a good idea but that one of the things to do after you get the basic
to work.
Again if you don’t have these go back to the table design and put them in.
Right the area outside the design (normally grey) and open the properties
box.
Select Format
Select = Default Format = Continuous Forms
Save the form and close it.
Open the frmShifts in design view
Click view then Toolbox so you can see the toolbox.
Select Subform (click it – it will change color)
Single left click the Details section of your form.
And a box will open – select use and existing form
Select frmEmployees from the list (if there is one).
Click next and select Define My Own (form parent/child)
In both the panes select ShiftID
ClickNext and save (as frmSubEmployees)
Save the form.
When you look at the form now (in form view) the frmShifts will have a
subform showing the employees on that shift.
Next the date.
If it was me designing for inexperienced users I may be temped to use a
calendar control (search this forum for tips on this).
But for now.
Open you frmShifts in design view.
Right the date box and open the properties box.
Go to the data column and put this
Control Source = Your Date Field
Input Mask = 00/00/0000;0;_
Default Value = =Date()
Note that
00/00/0000;0;_ will be used for dates like this 25/12/2006 (this Christmas
day). If you want you can alter this to whatever you find easier.
=Date() will mean that the current date will be shown on new records.
To get the date that want simply open the form in Form View and type in the
date that you want and the employees on shift that day will be shown in the
sub form.
Obviously you need to gig about with the subform size and add fields as you
see fit.
But that is Form and subform making 101.
Enjoy

Signature
Wayne
Manchester, England.
Not an expert.
Enjoy whatever it is you do.
Sydious - 14 Aug 2006 00:32 GMT
This may be a dumb question.....
Why does the Shifts Table get and EmployeeID?
Not sure I understand. The shifts table holds no employee info.
> Datasheets are a little bit weird sometimes to work with if you’re not to
> them so (if it was me this is what I’d do).
[quoted text clipped - 84 lines]
>
> Enjoy
Wayne-I-M - 14 Aug 2006 08:22 GMT
> This may be a dumb question.....
> Why does the Shifts Table get and EmployeeID?
> Not sure I understand. The shifts table holds no employee info.
The shift table contains all the information about "shifts" and the
employeeID. You use this "linking field" so that you can allocate employees
on to various shifts.
In all relational tables there has to be a "key" that will link the tables
together. Normally this is the primary field (but it doesn't have to be -
it's just less likely to mess up if it is) which is a unique identifier - as
there may be more than 1 John Smith (normally an autonumber field so you can
ensure there are no duplications).

Signature
Wayne
Manchester, England.
Not an expert.
Enjoy whatever it is you do.