Higlight text box if with a Check box

  • Thread starter Thread starter Ready to Go
  • Start date Start date
I want to have a text box come "alive" if a check a yes/no check box is "no"

Come alive? Perhaps you mean made Visible.

Code the Check box control's AfterUpdate event:
Me![TextControl].Visible = Me![CheckBoxField] = 0

Place the same code in the form's Current event.
 
by alive -I will guess you mean enabled. In the click event of the chkbox,
If Me.chkYourName Then
Me.YourTextbox.Enabled = false
Else
Me.YourTextbox.Enabled = True
End If

You can also set other properties of the textbox the same way - the border
style, color, width, etc.

Damon
 
Ready to Go,
Use the Checkbox (ex. chkABC) AfterUpdate event to make your text
control (ex. txtABC) come "alive" (whatever that means)
I'll assume txtABC is disabled...

If chkABC = True Then
txtABC.Enabled = True
End if

You'll also need to put that same code in the OnCurrent event of the
form.
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."
 
Ready to Go said:
I want to have a text box come "alive" if a check a yes/no check box is "no"


Is the text box currently disabled or invisible? I can give you a solution
for either condition, enabled/disabled or visible/invisible.

How comfortable are you with VBA?
 
Wouldn't that also need the enabled (or whatever) property set to false if
chkABC is false?

Me.txtABC.Enabled = Me.chkABC
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Excel Move or Copy Stopped Working? 0
Color Text Box 15
Check box teaser 2
Check Box to control Text Box 4
Set all check boxes values on form 4
Message box error check box 1
Check Box query issue 3
update check box 3

Back
Top