Append Query Question - Days of the week

  • Thread starter Secret Squirrel
  • Start date
S

Secret Squirrel

I'm tracking employees attendance based on the following criteria:

No shows
Tardy
Left Early

I have a table called tblTimeClock where I import data from my time clock
system with the actual times the employee punches in and out.

I also have a table called tblBusinessHours where I store the current
business hours. I have custom records in this table that are directly linked
to a specifc employee because they may have special hours or they may be part
time employees.

What happens is every night after hours I run a macro that imports the data
into the tblTimeClock and then matches the shiftID to the tblBusinessHours to
lookup the business hours for that employee. Then it calculates if they are
late or leave early. If this is the case then it appends a record to the
tblAttendance. If there was no record in the tblTimeClock for an employee
then it creates a record in the tblAttendance as a No Show.

The problem I'm having is if the employee is working part time 3 days a week
then it will automatically create a record for them for the other 2 days. I
don't want it to do this for my part time employees. Any ideas on how I can
prevent it from creating records if they are part timers? I was thinking I
could create 5 true/false fields in my tblBusinessHours, one for each day of
the week. Then have it some how look up to see which values are true and if
there is no record for one of those days in the tblTimeClock then have it
append a record to the tblAttendance. But if any of these fields are false
then do not have it append a record. I know this sounds confusing. I'm trying
to explain it the best I can. I just need to find a way to control which
records get appended if they are part timers. I figured I'd post here to see
if anyone has any advice.

Any ideas?
 
P

Pete D.

It might be easier to create a new catigory to your late/leave early such as
parttime or something like that. Then you wouldn't have to do more than add
that to your other calculations.
 
S

Secret Squirrel

Can you maybe explain that a little better?

Pete D. said:
It might be easier to create a new catigory to your late/leave early such as
parttime or something like that. Then you wouldn't have to do more than add
that to your other calculations.
 
P

Pete D.

If they are part time then this is normal time off, why not track that the
same as No Show, Tardy or Left early. This actually might become useful
information when counting personnel to hours. Just add it as one of those
catigories and calculate it. Same can be said of vacation time, it is just
another absents.
 
S

Secret Squirrel

I understand now but how do I know which are part time? That's the problem. I
don't know how I can flag the records in my tblTimeClock to show which
employees are part time.
 
P

Pete D.

Good question and I think you have it already but may need to look closer.
A normal employee had 8 hrs, part time let's say 4 a temp 5. Use you custom
records to bump this together.

"I have custom records in this table that are directly linked
to a specifc employee because they may have special hours or they may
be part time employees. What happens is every night after hours I run a
macro that imports the
data

In my job we have workorders and every quarter of an hour not against a
workorder must be recorded as a specific time off, such as appointment,
sick, detail... You have all the pieces, you just need some more busness
rules, which I'm afraid may be a little bit more code.
 

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