A user clicks on a cmdButton with the click event set to store the date/time in a table "tblDateTime." The date and time are automatically entered with the Now() function. My problem is that later in the day, that same user can come back, click on the same cmdButton (Sign-In or Sign-Out), and automatically change the date/time in the field in the table that stored the original date/time.(It doesn't work to tell a group of teachers to be carefull choosing a sign-in button when you meant to choose sign-out, and so on.) I need a way to "stop" the process if someone tries to sign-out before they sign-in, or sign-in twice, or....and so on.
How do I check to see if a user has already signed in or out? What I think I'm trying to do is get to the Sign In and Sign out times stored in the table "tblDateTime" which has the field "SignIn" and "SignOut" on them.
I want the user to click on the cmdSignIn and proceed if there is not already a time entry in the appropriate field. My ultimate goal is to generate the following error messages:
"You have already signed-in on this date."
"You cannot sign-out before you sign-in"
and
"You are signing out for the day, but never signed in"
and so on...
How do I check to see if a user has already signed in or out? What I think I'm trying to do is get to the Sign In and Sign out times stored in the table "tblDateTime" which has the field "SignIn" and "SignOut" on them.
I want the user to click on the cmdSignIn and proceed if there is not already a time entry in the appropriate field. My ultimate goal is to generate the following error messages:
"You have already signed-in on this date."
"You cannot sign-out before you sign-in"
and
"You are signing out for the day, but never signed in"
and so on...