How to Format a Row based on value of field on that row

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Access 2003 sp2

I'd like to be able to "highlight" a row grey when the value of a particular
field on that row is zero. For instance:

Client 1 Total Billing $5,000.00
Client 2 Total Billing .00
Client 3 Total Billing $ 500.00

Where all information above would print but row 2 would be highlighted grey
to bring attention.
 
On the OnFormat event on the details section, where this fields are located
in, you can write the code

If Me.FieldName= 0 Then
Me.Section(0).BackColor = 12632256 ' Gray
Else
Me.Section(0).BackColor = 16777215 ' White
End If
 

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

Back
Top