Results 1 to 15 of 15
  1. #1
    imintrouble is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2011
    Location
    Missouri, where frownin's a sport
    Posts
    127

    Exclamation Need help creating Time Recording Access Application

    Hi! I just received a project which has to be able to let someone enter their name or some other sort of id which then starts counting the time that they are working, stopping when they are done. This needs to be able to show individual times worked for each employee but also show total hours worked in an easy to read way. Please help me as it's been at least a year since I last touched Access. Any intelligent help would be greatly appreciated.

  2. #2
    Robeen is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,596
    Hi imintrouble!

    I think what you need to do is not difficult but I have some questions.

    What you describe includes two [or three] different functions:
    1. Recording Employees' TimeIn and TimeOut - like a Clock-In, Clock-Out application.
    2. Showing ONE Employee's HoursWorked for ONE Day.
    3. Showing ONE Employee's HoursWorked for the CurrentPayPeriod [?].
    4. Showing ALL Employeees' HoursWorked for ONE Day and CurrentPayPeriod [?].

    Tell me if I'm understanding you correctly.

    If I DID get it right . . . then I'm basically thinking of:
    1.
    A Data Entry Form that will be used for Employees to Clock In and Clock Out. This Form can be designed to know if the Employee is Clocking in or out based on the last thing the Employee did. You might have to consider logic that handles an Employee who clocks In one morning . . .
    forgets to clock Out that day . . . and
    comes in the next morning and wants to clock In.
    AND
    Employees who clock Out for Lunch and forget to clock back in after lunch . . . and then at the end of their shift want to Clock Out again.

    2. A Report that shows each Employee their Hours [this Report can be accessed from the DataEntry Form].

    3. A Form that allows Management to choose to view/print a Report on a single Employee - a Group of Employees - or ALL Employees - over a given time period [Today, Week to Date, Pay Period, Year To Date].

    Each of these components is pretty simple to get going.

    I think you should start by creating a Table to hold your EmployeeHours Worked data.
    Next, you should create the Data Entry Form - based on the 'EmployeeHours' Table.

    Hope this helps!

  3. #3
    imintrouble is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2011
    Location
    Missouri, where frownin's a sport
    Posts
    127
    Thanks Robeen for you reply! Actually looking back at my previous post i realized that i did not say exactly what was needed for this project. At my work, we are working with an Access database project which will be used quit a bit. What I need is a way to begin recording how many hours are being worked on this project so that my higher-ups can be aware of how much time has been spent working on this important project. Also, if you don't mind >.<, I'm very new to Access so I don't understand alot of the jargon used. Thanks!

  4. #4
    Robeen is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,596
    I think you should start by creating a Table to hold your EmployeeHours Worked data.
    Next, you should create the Data Entry Form - based on the 'EmployeeHours' Table.
    Have you got a Table created to hold your hours worked?
    Do you know how to create a Data Entry Form based on the Table?

    Tell me what you need help with and I'll do my best to help.

  5. #5
    imintrouble is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2011
    Location
    Missouri, where frownin's a sport
    Posts
    127
    Actually I do have the table, but right now its just a blank table with nothing in it except ID :\ And no, i don't know how to create a Data Entry Form for this table.

  6. #6
    Robeen is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,596
    What Data is in your ID field?
    Does it identify a person?
    Have you made it an 'Auto Number' field?

    I know a lot of the people on this Forum like 'Auto Number' fields. I personally never use them because I do not have total control over the numbering.

    I prefer to create an ID field that is a year-month-number:
    201109001 [the first person to get a new ID in Sept of 2011]. But you can decide how you set this field up to identify your people.
    Then you will need a field for the Date and a field for the Time [or a single field for DateTime.
    Then you will need a field for Out/In - or Start/Stop. This will allow you to calculate the actual time spent between Start & Stop.
    You can add fields later as needed.

    Do you know how to create a Form based on this Table?

  7. #7
    imintrouble is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2011
    Location
    Missouri, where frownin's a sport
    Posts
    127
    I think you just click the Create Form tab. while in the table that I am using. As for the ID field, I haven't set anything to it yet, as in it's the generic new table id field.

  8. #8
    Robeen is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,596
    Well . . . let me know if you need more help.

  9. #9
    imintrouble is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2011
    Location
    Missouri, where frownin's a sport
    Posts
    127
    Thank you robeen, I have created the table with the fields: ID, Date_Worked, Strt_Time, End_Time, and Hrs_Worked. And the ID field is in AutoNumber data type. Strt_Time and End_Time are both in Date/Time data type and Total_Hrs_Wrkd is a number data type. I am curious however, as to how I make this form which is related to this table work in the way that I want it to. thanks again.

  10. #10
    Robeen is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,596
    I have a question about your Table.
    If your ID field is and AutoNumber field - then it will give you a new ID for every record that is added to the table.

    If there is only one person's time being tracked then this should not be a problem.

    If more than one person is working on your project - than you will need another field to identify the person whose time is being entered.

    Ok.
    So . . . Now that you have the Table in which your data will be stored, you need to decide everything that you need to be able to do in your database.

    In an earlier post I asked:

    What you describe includes two [or three] different functions:
    1. Recording Employees' TimeIn and TimeOut - like a Clock-In, Clock-Out application.
    2. Showing ONE Employee's HoursWorked for ONE Day.
    3. Showing ONE Employee's HoursWorked for the CurrentPayPeriod [?].
    4. Showing ALL Employeees' HoursWorked for ONE Day and CurrentPayPeriod [?].

    Tell me if I'm understanding you correctly.
    If you can detail for me each thing that you want to be able to do with your data - I can advise you on the best way to get started.

  11. #11
    imintrouble is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2011
    Location
    Missouri, where frownin's a sport
    Posts
    127
    well what I'm now trying to do right now, as I've spent the good part of the day while not in classes, researching how to create a form which takes in three things, a persons name, the start time, and the end time. I am now attempting to create some arithmatic which will feed into one other field how many hours have elapsed from the start time to the end time. as for the questions about the functions:

    1. yes, it is just like an employees' clock-in, clock-out application in that when you begin working on this project, you fill out when you started along with your name, then when you finish you go back to the same form and input what time you ended. this information then gets placed into the total hours worked field.

    2. That is also part of what this project is supposed to do, say that this employee was working on this project at this time for this long.

    3. & 4. I'm not entirely sure if this information is completely relevant to the project, I could be wrong but who knows.

    Right now I seem to be having trouble discovering how to create an expression which will do what I need it to do, take the start and end time from each other to get hours worked.

  12. #12
    Robeen is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,596
    Does 'TotalHoursWorked ' mean total hours from the very first day the person started working on the project - like an Overall Total of hours the person has spent on the project?
    Or do you want it to be just the Total Hours worked by the person 'Today'?
    Or Both?

  13. #13
    imintrouble is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2011
    Location
    Missouri, where frownin's a sport
    Posts
    127
    Since reaching this point in the project, my supervisor has told me that what I have is good.

    an Autonumber ID field which ever new instance of someone working on the project will appear. A date_worked field which will hold the date which someone worked on the project, a start time and an end time for which the individual times will be stored, an hours worked field which holds a module for caluculating how long it took from start time to end time, and two seperate fields for the persons first name and then their last name.

    Unfortunatly i am becoming increasingly confused as to why my form ,which is what we will be using to input the information, insists upon not entering the information after the first one into my table which is to hold all of this information.

    The first row is as follows: "ID : 1, Date_worked : 9/27/2011, Strt_Time : 2:18:00 AM, End_Time : 3:01:00 AM, HoursWorked : 43 Minutes, First_Name : Jack, Last_Name : Cobb"

    All of this information is being recieved by one person and input, through the form, and appear in its own row on the table.

  14. #14
    Robeen is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,596
    can you post your db here?

  15. #15
    imintrouble is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2011
    Location
    Missouri, where frownin's a sport
    Posts
    127
    I'm sorry robeen but i've been instructed to not post the db up here. I think the only real help that I'll be in need of right now would probably be with making sure my form is inputing the information correctly. the code I am using for the math portion is:

    Public Function ElapsedTimeString(dateTimeStart As Date, _
    dateTimeEnd As Date) _
    As String
    Dim interval As Double, str As String, days As Variant
    Dim hours As String, minutes As String, seconds As String
    If IsNull(dateTimeStart) = True Or _
    IsNull(dateTimeEnd) = True Then Exit Function
    interval = dateTimeEnd - dateTimeStart
    days = Fix(CSng(interval))
    hours = Format(interval, "h")
    minutes = Format(interval, "n")
    seconds = Format(interval, "s")
    ' Days part of the string
    str = IIf(days = 0, "", _
    IIf(days = 1, days & " Day", days & " Days"))
    str = str & IIf(days = 0, "", _
    IIf(hours & minutes & seconds <> "000", ", ", " "))
    ' Hours part of the string
    str = str & IIf(hours = "0", "", _
    IIf(hours = "1", hours & " Hour", hours & " Hours"))
    str = str & IIf(hours = "0", "", _
    IIf(minutes & seconds <> "00", ", ", " "))
    ' Minutes part of the string
    str = str & IIf(minutes = "0", "", _
    IIf(minutes = "1", minutes & " Minute", _
    minutes & " Minutes"))

    str = str & IIf(minutes = "0", "", _
    IIf(seconds <> "0", ", ", " "))
    ' Seconds part of the string
    str = str & IIf(seconds = "0", "", _
    IIf(seconds = "1", seconds & " Second", _
    seconds & " Seconds"))

    ElapsedTimeString = IIf(str = "", "0", str)
    End Function
    I don't know if that helps but the problem I was having with it is that the hoursWorked field was not updating automatically as a table, but worked perfectly as a query.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Whos Logged in????????
    By george.vniekerk in forum Security
    Replies: 2
    Last Post: 08-26-2011, 12:24 PM
  2. logged user name on main form
    By foxtet in forum Forms
    Replies: 1
    Last Post: 07-30-2011, 03:00 PM
  3. Getusername of currently logged in user
    By nkuebelbeck in forum Access
    Replies: 8
    Last Post: 06-29-2011, 04:06 PM
  4. Replies: 2
    Last Post: 12-23-2010, 09:11 AM
  5. Currently logged in user into text box
    By ne16428 in forum Security
    Replies: 5
    Last Post: 06-10-2009, 11:46 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums