I am trying to assign the current date to a field or clear the date from a field by clicking a checkbox. The problem I have is:
When I check the box I cannot get the date field to display the date (or clear it) until I click on it and the control won't allow me to use the "Setfocus" property to do this automatically.
The Code I am using:
Private Sub StepCredited_Click()
If StepCredited.Value = True Then
CreditDate.Value = Now
Else
CreditDate.Value = Null
End If
End Sub
I have tried using the requery command on the form but it say the field must be saved first!?
Any suggestions gratefully accepted!
When I check the box I cannot get the date field to display the date (or clear it) until I click on it and the control won't allow me to use the "Setfocus" property to do this automatically.
The Code I am using:
Private Sub StepCredited_Click()
If StepCredited.Value = True Then
CreditDate.Value = Now
Else
CreditDate.Value = Null
End If
End Sub
I have tried using the requery command on the form but it say the field must be saved first!?
Any suggestions gratefully accepted!