UnDim Control box if other control =YES

W

Wayne

I need to enable a control if the user selects yes in
check box of another control.

Thanks in advance
Wayne
 
R

Ronald W. Roberts

If Me!SomeCheckBox = True then
Me!SomeOtherControl.Enabled = True
Else
Me!SomeOtherControl.Enabled = False
Endif

Ron
 
W

Wayne Morgan

In the AfterUpdate event of the check box try something like:

Me.NameOfOtherControl.Enabled = Me.NameOfCheckBox.Value

This will enable the other control if the checkbox is true (checked) and
disable it if the checkbox is false (not checked). Make sure that the
checkbox can't have a Null value for this to work. If it can, you can do the
above with an If statement instead

If Me.NameOfCheckbox = True Then
Me.NameOfOtherControl.Enabled = True
Else
Me.NameOfOtherControl.Enabled = False
End If

If the value of the checkbox is to be remember (i.e. it is bound to a field
in the underlying table) then you will also need to place the above code in
the form's Current event.
 
W

Wayne

Thx Ron
It works great.
Wayne


-----Original Message-----
If Me!SomeCheckBox = True then
Me!SomeOtherControl.Enabled = True
Else
Me!SomeOtherControl.Enabled = False
Endif

Ron


.
 

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