Not to override a field

  • Thread starter Thread starter Christine
  • Start date Start date
C

Christine

I am new at access 2007, I have a button to automatically put the time into a
field.
Forms!LB!LogTime.SetFocus
Forms!LB!LogTime = Now()
but it override the data if the button is pressed again. I would like it to
ask "yes or No" if the data should override the time.
 
If IsNull(Forms!LB!LogTime) = False Then
If MsgBox("Override the time?", vbYesNo) = vbYes Then
Forms!LB!LogTime = Now()
End If
Else
Forms!LB!LogTime = Now()
End If
 
Back
Top