Highlight specific record and field

A

Ad Garett

Please help,

I'd like to highlight particular field values regarding another field's data
in a continuous form:

field minlevel
field order:

for instance when order is > 2*minlevel I'd like to highlight order either
by highlighting font or changing background ... Any idea how to do so by
using access 97 ? and access 2000?

Many thanks in advance.

Regards
Ad Garett
 
G

Gary Miller

Ad,

This is usually done in the Form's OnCurrent event. There are both a
BackColor and a ForeColor (font) property available for most controls. For
your example you would use something like...

If Me!Order > 2 * Me!MinLevel Then
Me!Order.ForeColor = 255 'Red
Else
Me!Order.ForeColor = 0 'Black
End If

There are some VB constants for the colors, but I don't have those handy.

Gary Miller
 

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