Time Sheet Command Button

ScrmingWhisprs

I <3 Coffee Milk.
Local time
Today, 09:59
Joined
Jun 29, 2006
Messages
156
I have a datasheet subform on my TimeSheet for for my volunteer database. What kind of code do I need for a command button to "punch out" a volunteer. TimeIn is easy, I just set the default value to Now(), but I don't know how to do that with the the TimeOut.

Thanks
ScrmingWhisprs
 
just set the command button to

Code:
Me.YourTextBoxNameHere = Now
 
That works great! Thank you.


I have changed this form from a datasheet to a continuous form, and I have placed that command button right next to the TimeOut textbox. So now when that volunteer gets signed out for the day, the time goes in the box. Now is it possible to lock that field so that after the button is pushed, you can't accidently push that button on that record, or any of the other records on the continuous form, and accidently change the time?

ScrmingWhisprs
 
If you change it to this:
Code:
If IsNull(Me.YourTextBoxNameHere) Then
    Me.YourTextBoxNameHere = Now
End If
Then, if there is anything in the text box then it won't enter the date/time.
 

Users who are viewing this thread

Back
Top Bottom