Question Locked

Access 2002 Check Box Question

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Here's what I've got (Access 2002):

Color (check box)
Color Name (text box)
Color Approval Date (text box)

Color (check box)
Color Approval Date (text box)

Here's what I want: each group of fields to be grayed out until the check box is clicked. How? And thanks!

3 replies

by john.a.wills

If you need to reset sometime after opening the form, Me.Checkbox1 = Null

by markpkessinger

For the check box that controls the other fields, use an Event Procedure in the "On Click" event. With the other fields, set the default value of the "Enabled" property to "No."

In the code for the "Click" event for the check box, enter the following:

If IsNull(Me!Color) = False Then
Me![Color Name].Enabled = True
Me![Color Approval Date].Enabled = True
&& continue with yoru other fields in the
&& same manner
End if

You could also put that code in the form's "On Current" event procedure. That way, when the record is initially displayed, it will examine the value of the checkbox to see whether or not the other fields should be changed to "enabled". Then the checkbox event procedure will take care of any changes in the status of the checkbox.

This discussion is closed to new replies.