Discussion Locked

Access 2000

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

How can I get Access to recognize and add each employee?s hours for each week? Do I need a table with the weekending dates? Our week run Sunday thru Saturday. When I figure out who runs over 40 hours for the week then I have to mark those hours for double time. Any suggestions?
Thanks.
Debbie

5 replies

by peyison

Debbie,

This depends on how your table is set up and how your process is designed. Do you enter time every day, and at the point you enter the time you calculate the pay amount for the day? Or is the pay amount calculated in another process, thatis run once a week? Also - do you know any VBA?

Here's how you might do the first way:
I'm assuming that you have a form in which you enter the hours worked for an employee for the day. After typing in the hours, you press a button called Update. This button would update the table then calculate the pay amount. First, use the Weekday function to figure out the day of the week. From that you can calculate the date of last Sunday. If today is Friday, Weekday(Date) returns a 6 (unless you change the FirstDayOfWeek parameter). Sunday is 1, so 5 days ago (6-1) was Sunday, so the date of last Sunday is Date-5. Knowing that, you can run a query to sum the hours since last Sunday for this employee. You can use this total to determine if you need to pay double time.

I'm not sure if you're doing daily, or not, and I'm probably running out of room here. If you'd like to discuss more, send me an email. mike@peyison.com

Hope this helps.

by galamb

Debbie,

Assuming that you have a payroll table already set up make sure you have the following (or similar) fields along with employee names and other data: WEEK ENDING, REG HOURS, OT HOURS, RATE, and OT RATE. Make a query in design view of at least the following fields: WEEK ENDING, EMPLOYEE NAME, REG HOURS, OT HOURS, RATE, and OT RATE. Right click on the next empty field and select ?Zoom?. In the Zoom box type in the following: REG PAY:[REG HOURS]*[RATE]
Again right click on the next empty field select ?Zoom? and type in the following: OT PAY:[OT HOURS]*[OT RATE] Again right click on the next empty field select ?Zoom? and type in the following TOTAL PAY:[REG PAY]+[OT PAY]
Run the query and you should see these fields with the computed totals. As you can see, you do not need to set up a table with the weekending dates. By having a WEEK ENDING date field in your payroll table, you can run a query using a certain week?s payroll as criteria. I hope that this helps you and if you wish I could e-mail you a sample of this database.

electrojolt@hotmail.com

This discussion is closed to new replies.