1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Timestamp from command button

Discussion in 'Business Applications' started by jmo422, Dec 17, 2008.

Thread Status:
Not open for further replies.
Advertisement
  1. jmo422

    jmo422 Thread Starter

    Joined:
    Dec 30, 2007
    Messages:
    34
    Hey guys,

    I am starting a new database that tracks time spent on jobs, I was wondering if it is possible to create a log in and log out button, that would enter in the start time (log in) and end time ( log out) based on when the user clicks on the corresponding command button. If at all possible I would like it to transpose to a text box setup in a table.

    Thanks in advance,

    Jay
     
  2. Jimmy the Hand

    Jimmy the Hand

    Joined:
    Jul 28, 2006
    Messages:
    1,223
    Jay,
    what application are you working with?

    Jimmy
     
  3. jmo422

    jmo422 Thread Starter

    Joined:
    Dec 30, 2007
    Messages:
    34
    Jimmy,

    I am working in Access.
     
  4. Jimmy the Hand

    Jimmy the Hand

    Joined:
    Jul 28, 2006
    Messages:
    1,223
    This might help you then.
    A simple form with two buttons: a Login and a Logout. They each add one new record to Table1.

    Jimmy
     

    Attached Files:

    • db1.zip
      File size:
      13.3 KB
      Views:
      77
  5. OBP

    OBP Trusted Advisor

    Joined:
    Mar 8, 2005
    Messages:
    19,659
    Jay & Jimmy, you can use just one Command Button if you want, you just need to have one record for both logging In and Logging Out, you check if the Log In field has been Entered, if it has you update the Logging Out Field, if it hasn't you update the Logging In field. But you do need a date field as well. I assume that the Record would also hold the "Job" that they were doing?
    I did a similar totally automatic version recently based on the Login ID of a Secured Database.
     
  6. Jimmy the Hand

    Jimmy the Hand

    Joined:
    Jul 28, 2006
    Messages:
    1,223
    Once I made a similar log in/out system, where the login and logout times were in the same record. But I always used two buttons, so in my setup it could easily happen that someone logged in more times repeatedly, or logged out even though he hadn't logged in yet. I needed to take precautions, which made the code more complicated than I wanted to post here.
    Using one button for both actions - now that's a great idea, indeed. (y)

    Jimmy
     
  7. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/780463

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice