text box text color change (1 Viewer)

dapfeifer

Bringing Maverick Mojo
Local time
Today, 15:42
Joined
Jun 17, 2008
Messages
68
Hey all,

I've got a form that monitors values as they vary between certain points of time, and I was wondering if someone could point me in the right direction for how to change the text color of the text box font if the value in that box goes negative. There are about 200 records the person can go through and I thought the afterupdate property would work, but that doesn't seem to be the case. If someone could give any suggestions I would appreciate it.

Thanks.
 

Alansidman

AWF VIP
Local time
Today, 15:42
Joined
Jul 31, 2008
Messages
1,493
In your form in design view, right click on the control you wish to format, select conditional formatting. Put in your criteria and formattng desired and you should be good to go.

Alan
 

tranchemontaigne

Registered User.
Local time
Today, 13:42
Joined
Aug 12, 2008
Messages
203
you could also write code (OnCurrent event perhaps) to perform a test (to see if the value is greater than zero) and then dynamically set the forecolor property of the text box control using an if...endif or select case...end select statement
________
Alaska Medical Marijuana Dispensaries
 
Last edited:

missinglinq

AWF VIP
Local time
Today, 16:42
Joined
Jun 20, 2003
Messages
6,423
Note that the method suggested in Post # 3 will only work if the form is in Single View. Conditional Formatting will have to be used for Continuous/Datasheet View forms.
 

dapfeifer

Bringing Maverick Mojo
Local time
Today, 15:42
Joined
Jun 17, 2008
Messages
68
I appreciate the feedback. I had tried the OnCurrent event before posting the thread, but didn't get it to work. Conditional formatting seems to work perfect though, so I will go with that!

Thanks again for the help.
 

Users who are viewing this thread

Top Bottom