By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,510 Members | 1,497 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,510 IT Pros & Developers. It's quick & easy.

Help with a time clock function

P: 2
Been searching the web and various forums and can not find the answer that I need. Developing an application using MS Access 2000 and I need to include a time clock function. I have tried several different ways to store and track the data, but extracting the information for later in an easy way is the difficulty.

For example, I have 4 employees. They can clock in or clock out and it records the date/time of that action. So, in review, I know who (employee #), what (clocked in) and when (date/time stamp).

What I want to be able to do is get that information back out of table in an easy, clean way. How many hours did all the employees work on Monday? How many hours does #4 have for the week so far? You get the picture.

I see all the puzzle pieces, I just don't have a box top to start to arrange them in a smart, organized way. Suggestions? Models? Examples?

Thanks in advance.

Gene
Aug 2 '08 #1
Share this Question
Share on Google+
2 Replies


Dököll
Expert 100+
P: 2,364
Hello genen17821!

I believe you can use the DateDiff function in Access to compile a clean calculation of the hours worked for each, then calculate totals thereafter:

(1) You may need to have a check for when users are clocking out

(2) Checkboxes can be used to fire time clocked in and out

(3) Using DateDiff against TimeClockedIn, TimeClockedOut, as one example will give you number of hours, minutes, seconds, etc...

This can be pulled into your form. You can pin each Checkbox on your form, namely TimeClockedIn and TimeClockedOut to a Before or AfterUpdate type of event procedure to record a date either is checked.

Please stay here for a better idea on this. And if you have not previously searched here, I'd suggest you do, examples are surely available to fit your purpose.

Good luck with the project!

Dököll
Aug 2 '08 #2

P: 2
Hello genen17821!

I believe you can use the DateDiff function in Access to compile a clean calculation of the hours worked for each, then calculate totals thereafter:

(1) You may need to have a check for when users are clocking out

(2) Checkboxes can be used to fire time clocked in and out

(3) Using DateDiff against TimeClockedIn, TimeClockedOut, as one example will give you number of hours, minutes, seconds, etc...

This can be pulled into your form. You can pin each Checkbox on your form, namely TimeClockedIn and TimeClockedOut to a Before or AfterUpdate type of event procedure to record a date either is checked.

Please stay here for a better idea on this. And if you have not previously searched here, I'd suggest you do, examples are surely available to fit your purpose.

Good luck with the project!

Dököll

Thanks for the information - will work with the datediff function as that will help. However, the main problem that I am experiencing is the best way to structure the data. I would like to leave all the data in a table and then access it, calculate on it, etc, through queries (as opposed to code) to make things easiest. The question is, how to structure that table.

For example, is it best to just have have a tblClockTime that gets recorded each time the employee clocks in our out with a tblClockActionID that denotes if its clock in or clock out? Or would it be better to have a tblClockTimeIN field and a tblClockTimeOUT field and then work with the differences there?

I think that I will work with the second option for a while pending any further updates from yourself and or other members. Thanks!

Gene
Aug 2 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.