Change text box color

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
 
M

Marshall Barton

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.
 

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

Top