Access Database-Can I make a field inactive until another is checked?
I am using Access 2007, and am wondering if it is possible to make a field inactive (or grayed out) until another selection is made in another field.
Any suggestions?
Software
I am using Access 2007, and am wondering if it is possible to make a field inactive (or grayed out) until another selection is made in another field.
Any suggestions?
by techhelp2 Accepted solution
by john.a.wills Accepted solution
by src.costa Accepted solution
Something like this:
- Put 2 controls in a form:
- One checkbox and a textbox
- Change the property "Enable" of the Textbox to "False", so when you start the form,,it will be gray.
'- Put the code for the Checkbox click as showed below.
Private Sub Mycheckbox_Click()
If Me.Mycheckbox = True Then
Me.myTextBox.Enabled = True
Else
Me.myTextBox.Enabled = False
End If
End Sub
by techhelp2 Accepted solution
by robertswork Accepted solution
You don't need to do an IF/Then for the status of the checkbox. Just make the enabled property = the value of the checkbox
me.textbox_name.enabled = me.checkbox
You can place this line of code into the After_Update event of the checkbox
This discussion is closed to new replies.
Sort by Trending