Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

After Update Text Color Change

Status
Not open for further replies.

jbento

Technical User
Jul 20, 2001
573
US
Is there anyway to change the text color of a field on a form on the After Update event?

I use something like: Me.textbox1.forecolor = 255673 on the After Update event.

The color changes to red while the form is up, but if I close down and open it up again, it goes back to the original color.

Do anyone know how to keep the color on the After Update?

Please help someone.

Thanks in advance.

Jerome Benton
JERPAT Web Designs
GOD Is Good All The Time!!!
 
This is the correct syntax I am using:
Me!Acct.ForeColor = vbRed

but the color doesn't stay after I leave form and c

Jerome Benton
JERPAT Web Designs
GOD Is Good All The Time!!!
 
This is the correct syntax I am using:
Me!Acct.ForeColor = vbRed

but the color doesn't stay after I leave form and come back

Sorry about the repeat thread, but my computer messed up on the last thread and submitted inadvertently

Jerome Benton
JERPAT Web Designs
GOD Is Good All The Time!!!
 
Sure. Coupla ways:

1. Store the color Value as a Static variable in a Module (this will keep the value even if the form is closed but not if the database is closed).
2. Store the color value as a field in a table (this will keep the value even if the database is closed).
Hope that helps!


 
I did it this way and it seems to work:

I created another field as yes/no

I have the following code on the field of the form (After Update event):
Me!text1.ForeColor = vbRed
yes.Value = True

Then I put the following on the On Open event of that form:
If yes.Value = True Then
Me!text1.ForeColor = vbRed
End If

Then I will create another button on the form to change every field back to a normal color once the fields have been verified of the changes to red.

This will work for me.

Thanks for responding.


Jerome Benton
JERPAT Web Designs
GOD Is Good All The Time!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top