473,486 Members | 1,774 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Time Clock

1 New Member
I work in Human resources and my company has very limited resources. I am trying to put together a database that will allow my employees to clock in and out on. I am a novice Access user so this has been a little difficult. What I would like to happen, is to have a button to clock in, clock out, break in/out and lunch. When the button is clicked I would like to have the text box below the button display the date and time and time. Any advise besides just going out and purchasing a program?
Jan 28 '12 #1
3 4300
Seth Schrock
2,965 Recognized Expert Specialist
Have you done anything with Access for this program or do you have a blank slate? How much time do you have to get a database up and running before you have to purchase a new system?
Jan 28 '12 #2
sierra7
446 Recognized Expert Contributor
Hi,
As you say that you are a novice in Access I'm going to attach a Microsoft example of a Time and Billing system to give you some idea of what might be achieved. In it's original form it did not the data logging that you require but I have started to extend it.

This system accumulates hours to specic tasks and calculates charges to be billed back to the project. Each project is identified to a customer. It also accumulates other expenses in addition to labour charges. So it is probably doing much more than you currently require.

The naming of tables, forms, queries and reports seems to be aimed at giving clarity to their function rather than the more generally adopted convention of prefixing each with tbl, frm, qry and rpt; and removing spaces.

One neat trick, that is used to copy the Billing Rate from an Employee to a task, is to use a hidden column in the combo box (see if you can find it!) This is easy in access but I've never managed it in VB.

To extend this application to your requirement you will need to capture two extra fields (called say StartTime and FinishTime) I think you have two options. The first would be just to add them to the table [Time Card Hours]. The existing field [Billable Hours] would then have to be calculated.

(Time passes. . . while I check viability )

OK, I've just tested out these thoughts and they are now incorporated in the attached application. When it opens click on the Time Cards button and then add an entry. Double click on StartTime and the current time will be entered. Let time pass then double click on EndTime. The new current time will be entered then the BillingHours will be calculated. I've added code to round the times to nearest quarter hour, to avoid silly decimals (Write your own). The added code is something like this
Expand|Select|Wrap|Line Numbers
  1. Private Sub StartTime_DblClick(Cancel As Integer)
  2. Me.StartTime = Now()
  3. End Sub
  4.  
  5. Private Sub EndTime_DblClick(Cancel As Integer)
  6.  
  7. If IsNull(Me.StartTime) Then
  8.     MsgBox "Please enter a Start Time", vbCritical, "No Start Time"
  9.     Me.StartTime.SetFocus
  10.     Exit Sub
  11. End If
  12.  
  13. Me.EndTime = Now()
  14. checkHours
  15. End Sub
  16.  
  17. Private Sub checkHours()
  18.  
  19. Dim WholeHours As Integer
  20. Dim WholeMinutes As Integer
  21. Dim DeciHours As Single
  22.  
  23. WholeHours = DateDiff("h", Me.StartTime, Me.EndTime)
  24. WholeMinutes = DateDiff("n", Me.StartTime, Me.EndTime) Mod 60
  25.  
  26. If WholeMinutes < 15 Then
  27.     DeciHours = 0
  28. ElseIf WholeMinutes >= 15 Then
  29.     DeciHours = 0.25
  30. ElseIf WholeMinutes >= 30 Then
  31.     DeciHours = 0.5
  32. ElseIf WholeMinutes >= 45 Then
  33.     DeciHours = 0.75
  34. ElseIf WholeMinutes > 55 Then
  35.     DeciHours = 1#
  36. End If
  37.  
  38. Me.BillableHours = WholeHours + DeciHours
  39.  
  40. End Sub
This is just a demo to give you some ideas. I don't think you can see the time card for a person for a particular week.

All users can see everything. This is OK if a clerk is entering the data but may need revising so general users only see their own time card. I would certainly consider a simplified input-form.

When I first looked at this I was considering adding a new table to hold the Start and End times (option 2 above), then rolling-up the bookings for a single day per Employee. But at the moment I cannot see many advantages in complicating the matter and wait for some initial feed-back
S7
Attached Files
File Type: zip Time_billing.zip (203.0 KB, 330 views)
Jan 29 '12 #3
TheSmileyCoder
2,322 Recognized Expert Moderator Top Contributor
Is this to be run from a single PC standing at the entrance? From multiple PC's standing at multiple entrances? Or from each users individual PC?
Jan 30 '12 #4

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

Similar topics

8
3385
by: peterbe | last post by:
What's the difference between time.clock() and time.time() (and please don't say clock() is the CPU clock and time() is the actual time because that doesn't help me at all :) I'm trying to...
3
3132
by: Szabolcs Nagy | last post by:
I have to measure the time of a while loop, but with time.clock i always get 0.0s, although python manual sais: "this is the function to use for benchmarking Python or timing algorithms" So i...
3
2508
by: Russell Warren | last post by:
Does anyone know how long it takes for time.clock() to roll over under win32? I'm aware that it uses QueryPerformanceCounter under win32... when I've used this in the past (other languages) it...
5
7641
by: Tobiah | last post by:
The manual says: On Unix, return the current processor time as a floating point number expressed in seconds. So I ran this program: #!/usr/bin/python import time
18
6186
by: Giovanni Bajo | last post by:
Hello, I experimented something very strange, a few days ago. I was debugging an application at a customer's site, and the problem turned out to be that time.clock() was going "backwards", that...
5
5628
by: yinglcs | last post by:
Hi, I am following this python example trying to time how long does an operation takes, like this: My question is why the content of the file (dataFile) is just '0.0'? I have tried "print...
9
8280
by: Ron Adam | last post by:
I'm having some cross platform issues with timing loops. It seems time.time is better for some computers/platforms and time.clock others, but it's not always clear which, so I came up with the...
7
1824
by: Godzilla | last post by:
Hello, I have been reading a thread about time.clock() going backward, which is exactly what I am seeing... the thread generally leaning toward the problem is caused by multi-processor machines....
8
1838
by: Theo v. Werkhoven | last post by:
hi, In this code I read out an instrument during a user determined period, and save the relative time of the sample (since the start of the test) and the readback value in a csv file. #v+...
2
1981
by: genen17821 | last post by:
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...
0
6964
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7173
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6839
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5427
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4863
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4559
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3066
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3070
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
259
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.