Change text box color

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form with two text box and a check box . The first text box is
labeled ID and it is a primary key. The second text box is customer’s name.
The form is viewed as a continuous form and each form are view as a row. What
I having problems is that I want to change the back color of the customer’s
name text box only on the selected form by checking the check box. I have
created the following code but the code effect all the forms in view. Note I
know I can resolve this in the new version of Access but this is created for
Access 97. Any Ideas is helpful, Thanks!

If me.checkbox=true than

Me.customersname.backcolor=vbred

Else

Me.customername.backcolor=vbblack

End if
 
Andy said:
I have a form with two text box and a check box . The first text box is
labeled ID and it is a primary key. The second text box is customer’s name.
The form is viewed as a continuous form and each form are view as a row. What
I having problems is that I want to change the back color of the customer’s
name text box only on the selected form by checking the check box. I have
created the following code but the code effect all the forms in view. Note I
know I can resolve this in the new version of Access but this is created for
Access 97.


Try one of the techniques at:
http://www.mvps.org/access/forms/frm0024.htm
in conjunction with:
http://www.mvps.org/access/forms/frm0055.htm
which avoides the font problems.
 
Back
Top