How to update a field value based on the condition of a check box?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a checkbox field, and a number field. If a person puts a check in the
check box then I want the value of the number field to immediately be set to
0.5. If they do not check the box I need the value to be 0.

I need this to occur immediately (and hopefully invisibly) at the time of
the checkbox field update, or I would settle for the value of the number
field being updated at the end of the record input.

Thanks
 
First you could put the defaultvalue property for the number field to
0. Then on after update even of your checkbox you can arrange the value
of your number field as like.

Private Sub MyCheckBox_AfterUpdate()
If Me.MyCheckBox=True Then
Me.NameOFNumberField=0.5
Else
Me.NameOFNumberField=0
End If
End Sub
 
hi Try this......

Private Sub on_Click()
If CheckBoxName.Value = True Then
FeildName.Value = 1800 '(whatever value you want to
enter)'
ElseIf CheckBoxName.Value = False Then
FeildName.Value = 0
End If
End Sub
 
Back
Top