What I am wanting is that when I check Check111 and Check1234 together, that these fields will
become "Unenabled." Which the first code works great for that. The problem that I am running into
is that in the second code, if I check Check1212 or Check1418 and leave Check111 and Check1234 blank
then Check1212 and Check1418 are still Enabled. I am wanting in a sense Check1212 and Check1418 to
overrule any other code so that if either of those are checked everything is locked. I want Check111
and Check1234 to become "Disabled" if Either check1212 or Check1418 are checked, but I also want
check1234, Check111 and Check116 to become "Disabled" if Check111 and Check1234 are checked. I am
assuming the problem is that I am duplicating code and confusing access, but I don't know of a simpler
way to write the code that would correct this. I tried to move the first code, to the After Update
section of the Form, instead of the On Current, but this didn't fix it. Any ideas?
Code:
Private Sub Form_Current()
If Me.Check111 = True And Me.Check1234 = True Then
Me.Check1234.Enabled = False
Me.Check111.Enabled = False
Me.check116.Enabled = False
Else
Me.Check1234.Enabled = True
Me.Check111.Enabled.Enabled = True
Me.check116.Enabled = True
End If
End Sub
Code:
Private Sub Form_Current()
If Me.Check1212 = True Or Me.Check1418 = True Then
Me.cmd_delete.Enabled = False
Me.Check1234.Enabled = False
Me.Check111.Enabled = False
Me.check116.Enabled = False
Me.cmd_save_record.Enabled = False
Me.enter_notes.Enabled = False
Else
Me.Check1234.Enabled = True
Me.Check111.Enabled.Enabled = True
Me.check116.Enabled = True
Me.cmd_delete.Enabled = True
Me.cmd_save_record.Enabled = True
Me.enter_notes.Enabled = True
End If
End Sub