on click = yes

  • Thread starter Thread starter cjgav
  • Start date Start date
C

cjgav

Hi
I would like the value of a yes/no field to change to yes on click of this
field in a form then update the value of a date field in the same form to
todays date.
Can anyone help with the code for this:?

Regards
Colin
 
What if the user wants to unclick the checkbox?

To always have a click mean "yes":

Private Sub NameOfCheckboxControl_Click()
Me.NameOfCheckboxControl.Value = True
Me.NameOfDateField.Value = Date()
End Sub
 
Steve said:
Put the following in the click event:

Me!NameOfYesNoField = "Yes"

You may prefer

Me!NameOfYesNoField= not Me!NameOfYesNoField

This causes the field to toggle back to No if the field is clicked
again.
 
Back
Top