UnDim Control box if other control =YES

  • Thread starter Thread starter Wayne
  • Start date Start date
W

Wayne

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

Thanks in advance
Wayne
 
If Me!SomeCheckBox = True then
Me!SomeOtherControl.Enabled = True
Else
Me!SomeOtherControl.Enabled = False
Endif

Ron
 
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.
 
Thx Ron
It works great.
Wayne


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

Ron


.
 
Back
Top