Change text forecolor property

DanWallace

Registered User.
Local time
Today, 13:29
Joined
Dec 5, 2008
Messages
40
Hi there,

So I'm making a report where I have one text box (txtTotalLabel) that says "Total:" and another textbox (txtRecords) that contains a different value for each set of records.

All I want to do is, if txtRecords gets populated with "0" then txtTotalLabel should have a forecolor of green, if it has anything above 0, make txtTotalLabel red.

I can change the value in code but I don't know what event would make it work more dynamically. Form load event just changes all instances of txtTotalLabel based on whatever the last instance of txtRecords is. That doesn't work.

Any suggestions?
 
Why not keep it simple. In the design mode. right click on the field you want to conditionally format. Click on Conditional formatting. Put in your conditions and away you go.

Alan
 
Why not keep it simple. In the design mode. right click on the field you want to conditionally format. Click on Conditional formatting. Put in your conditions and away you go.

Alan

Hey, that is awesome. Exactly what I wanted to do, I just didn't know about that feature.

Thanks mate!
 

Users who are viewing this thread

Back
Top Bottom