C
charles.kendricks
I am trying to develop a timesheet which employee would use to sign in
and out for work and for lunch. I want the date field to always
display today's date (short date format). I inserted the following
code if the forms open event:
Private Sub Form_Open(Cancel As Integer)
'Check that the form is opened for today's date
If (Me.Date.Value <> Format(Now(), "Short Date")) Then
'If the date field does not hold todays date then reset all
controls
Me.Date.Value = Format(Now(), "Short Date")
The date control on the form is bound to a field in the table used to
store employees times, and the default value for the control is Now()
(short date format), although removing the default value didn't seem
to make any difference.
and out for work and for lunch. I want the date field to always
display today's date (short date format). I inserted the following
code if the forms open event:
Private Sub Form_Open(Cancel As Integer)
'Check that the form is opened for today's date
If (Me.Date.Value <> Format(Now(), "Short Date")) Then
'If the date field does not hold todays date then reset all
controls
Me.Date.Value = Format(Now(), "Short Date")
The date control on the form is bound to a field in the table used to
store employees times, and the default value for the control is Now()
(short date format), although removing the default value didn't seem
to make any difference.