Time Clock/Punch Clock Database

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • SDaxx
    New Member
    • Nov 2013
    • 9

    Time Clock/Punch Clock Database

    Has anyone created a time clock Access database?

    I'm referring to a database that will allow the user to sign-in at the beginning of the day then sign-out for lunch, sign back in then sign out at the end of the day. Then be able to total the number of hours worked. I also need to be able to track the time for those employees that do not sign in and out.

    What I'm 'hoping' for is that someone has a sample database or reference they are willing to share so I can see how to set this up.

    Thanks in advance for any help or suggestions.
  • zmbd
    Recognized Expert Moderator Expert
    • Mar 2012
    • 5501

    #2
    I haven't used this; however, it's on MS site:
    Description
    Manage your entire workforce's hours worked using this robust time card Access database template. Fields for workcode and description help you keep track of costs and work areas while you generate instant reports on everything from Billable hours by Employee to Billable Hours by Project.


    Also a simple search turned up a dozen more on the web.

    -z

    Comment

    • SDaxx
      New Member
      • Nov 2013
      • 9

      #3
      Thanks for the information it is a good starting point. However it does not have a timeclock feature for employees to clock in and out and that date and time of that action to be captured in a table. Any help would be appreciated.

      SDAXX

      Comment

      • Patrickwwevans
        New Member
        • Nov 2013
        • 8

        #4
        Here is how I have done this before. First make sure you have the code below to know the windows / AD id. Then set up your table where there is an userID column (varchar / text) then date / time column and then a Type column for either Start or End.. then you have a form on start up that on open, goes to a new record and all they have to do is click either a clock in button or clock out button. The vba code behind each will update the form with fosusername(), now() and either Start or End.

        Then you can query to get the time diff and format for date to group by actual date and not time. Hope this makes sense. Should take all of an hour to create.

        It is not a bad idea to also add code to lock down the db where they cannot get into the table in case you are worried about users "adjusting" their start / end times. You can prevent use of the shift key on open and also hid the ribbon to make it bullet proof.
        Code:
        Option Compare Database
        Private Declare Function apiGetUserName Lib "advapi32.dll" Alias _
            "GetUserNameA" (ByVal lpbuffer As String, nSize As Long) As Long
         
            Function fOSUsername() As String
        Dim lngLen As Long, lngx As Long
        Dim strUserName As String
        strUserName = String$(254, 0)
        lngLen = 255
        lngx = apiGetUserName(strUserName, lngLen)
         
         
        If lngx <> 0 Then
         
            strUserName = Left$(strUserName, lngLen - 1)
         
            fOSUsername = (Trim(Right(strUserName, 255)))
         
        Else
         
          fOSUsername = 0
         
        End If
        End Function
        Last edited by NeoPa; Nov 15 '13, 05:47 PM. Reason: Please remember ALWAYS to use the [CODE] tags when posting code.

        Comment

        • SDaxx
          New Member
          • Nov 2013
          • 9

          #5
          Thank You! It worked great.

          SDAXX

          Comment

          Working...