Tech Support Guy banner
Status
Not open for further replies.

Timestamp from command button

2K views 5 replies 3 participants last post by  Jimmy the Hand 
#1 ·
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
 
#4 ·
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
 

Attachments

#5 ·
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 ·
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
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. :up:

Jimmy
 
Status
Not open for further replies.
You have insufficient privileges to reply here.
Top