View Full Version : Formatting text depending on field value


nicksource
05-20-2008, 01:48 PM
Is it possible to format the font colour depending on the field value?

For example if FieldA < '10' it appears red, if it's greater it appears green? I'm guessing this requires VBA.

Thanks in advance.

pbaldy
05-20-2008, 01:50 PM
Look at Conditional Formatting (Format/Conditional Formatting) which is the easiest way to accomplish this in versions from 2000 on.

nicksource
05-20-2008, 01:56 PM
Is it possible to use Conditional formatting to compare 2 fields? If FieldA < FieldB? This way each row is unique, and not all fixed at the same value (which in my scenario wouldn't be suitable).

I don't see this option though under Conditional Formatting. :(


EDIT: Sorry, just seen I can add expressions into it! :) Thanks.

pbaldy
05-20-2008, 02:09 PM
No problem, glad you found the expressions. The only downside to Conditional Formatting is the 3 condition limit (4 total formats), but as long as you don't need more than that, it's the simplest solution, particularly for a continuous or datasheet form.

DCrake
05-21-2008, 02:37 AM
He is a little demo of how to create a simple conditional formatted continious form.

Feedback appreciated

CodeMaster::cool: