What is the best code for the following:
I answer "No" in a field and then I would like it to automatically answer
"No" in 5 differrent fields in the same form and record?
Graham Mandeno - 11 Feb 2007 21:22 GMT
Hi Jerry
Use the AfterUpdate event of the first control (checkbox?)
Private Sub Field1_AfterUpdate()
If Field1 = 0 Then
Field2 = 0
Field3 = 0
Field4 = 0
... etc
End If
End Sub

Signature
Good Luck :-)
Graham Mandeno [Access MVP]
Auckland, New Zealand
> What is the best code for the following:
> I answer "No" in a field and then I would like it to automatically answer
> "No" in 5 differrent fields in the same form and record?
John W. Vinson - 11 Feb 2007 21:27 GMT
>What is the best code for the following:
>I answer "No" in a field and then I would like it to automatically answer
>"No" in 5 differrent fields in the same form and record?
well... the best result might be to properly normalize your database
so this doesn't need to happen... but...
Use VBA code in the control's AfterUpdate event. Is this a text field,
or a Yes/No field? Is the form control a Checkbox, Textbox, or Combo
Box?
John W. Vinson [MVP]