Higlight text box if with a Check box

R

Ready to Go

I want to have a text box come "alive" if a check a yes/no check box is "no"
 
F

fredg

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.
 
D

Damon Heron

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
 
A

Al Campagna

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."
 
J

John B. Smotherman

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?
 
B

BruceM

Wouldn't that also need the enabled (or whatever) property set to false if
chkABC is false?

Me.txtABC.Enabled = Me.chkABC
 
Top