Command Button Enabled/Disabled Based on Text in Text Box
- From: DoveArrow <DoveArrow@xxxxxxxxx>
- Date: Sun, 29 Jul 2007 20:09:17 -0000
I'm trying to create a form where, if there is text in a text box, a
pair of command buttons will be enabled. I have figured out how to
make this work if the text box has been updated, but I can't figure
out how to make it work if there's already text in the box when the
form opens. If it helps, here's the code I've written to make the
buttons enable after text has been entered into the text box.
Private Sub Class1_Change()
If IsNull(Class1) Then
Class1LvlAdd.Enabled = False
Class1LvlRemove.Enabled = False
Else
Class1LvlAdd.Enabled = True
Class1LvlRemove.Enabled = True
End If
End Sub
Note: Right now, I'm taking my first baby steps into using Visual
Basic, so if the above looks laughably amateur, please be gentle.
.
- Follow-Ups:
- Prev by Date: Re: Building expression problem using Access Query.
- Next by Date: Re: Command Button Enabled/Disabled Based on Text in Text Box
- Previous by thread: Re: Dlookup Using Expression Builder
- Next by thread: Re: Command Button Enabled/Disabled Based on Text in Text Box
- Index(es):