Enabling/Disabling Checkboxes on Forms

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
 
E

Emilia Maxim

Jim said:
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...

Jim,

is this a continuous form by any chance?

Best regards
Emilia

Emilia Maxim
PC-SoftwareService, Stuttgart
http://www.maxim-software-service.de
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top