Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Conditional disabling of "check boxes"

Status
Not open for further replies.

DH

Programmer
Dec 8, 2000
168
Any one out there know how to conditionally enable/disable a check box on a form?

Conditional Formatting in Access 2000 from the format menu doesn't seem to apply here.

I would like to enable/disable a check box depending on user input that appears at the beginning of a form.

For example, If the user answered "great" to a question I would like a check box that appears later in the form to be disabled. However if the user answered "bad" to the question I would like the check box to be enabled.

Any ideas?



 
Simple. Just use the AfterUpdate event of the earlier control to test its value and set the check box's Enabled property appropriately. For example:
Code:
   Private Sub txtEarlier_AfterUpdate()
      If txtEarlier.Value = "great" Then
          chkCheckBox.Enabled = False
      Else
          chkCheckBox.Enabled = True
      End If
Rick Sprague
 
On After update event of your "GreatBad" field add code:
If Me.GreatBad = "great" then
Me.CheckBoxname.Enabled = False
Else
Me.Checkboxname.Enabled = True
End if
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top