Answer No and have it fill in No's in other fields

Answer No and have it fill in No's in other fields

Post by SmVycn » Mon, 12 Feb 2007 15:56:00


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?
 
 
 

Answer No and have it fill in No's in other fields

Post by Graham Man » Tue, 13 Feb 2007 06:22:28

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

--
Good Luck :-)

Graham Mandeno [Access MVP]
Auckland, New Zealand

 
 
 

Answer No and have it fill in No's in other fields

Post by John W. Vi » Tue, 13 Feb 2007 06:27:02

On Sat, 10 Feb 2007 22:56:00 -0800, Jerry



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]