Enabling/Disabling Checkboxes on Forms

  • Thread starter Thread starter Jim
  • Start date Start date
J

Jim

Hello,

Asked this previously and went unanswered...

Couldn't seem to find related topics so I'm seeking help
from the gurus...

What is the best way to enable/disable 2 checkboxes I have
on a form. Enabling them will be based on which one is
selected or updated...?

If chkBox1 is checked, I would like chkBox2 to be
disabled; however, when I new record is added, the default
setting for chkBox1 is checked/true which I would like to
disable chkBox2. Additionally, if chkBox1 is unchecked it
will enable chkBox2 thus both being enabled. Should
chkBox2 become checked/true, it will disable chkBox1.

That should paint a good picture of what I'm attempting to
accomplish... The code below is what I have currently, but
it changes the form on every record which is not good...

=====================================
Private Sub chkBox2_AfterUpdate()
If chkBox2.Value = True Then
chkBox1.Enabled = False
Else
chkBox1.Enabled = True
End If
End Sub


Private Sub chkBox1_AfterUpdate()
If chkBox1.Value = True Then
chkBox2.Enabled = False
Else
chkBox2.Enabled = True
End If
End Sub
=====================================

Any direction appreciated,
Jim
 
Back
Top