Colour formatting

otis1969

Registered User.
Local time
Today, 00:47
Joined
Mar 13, 2003
Messages
42
Is it possible to have a report (based on a query) to show different colours for different values? For example I have a report that shows different reasons. I would like any line with the value "System Down" to be in Bold Red. Not just the word System Down, but the whole line.

Thanks.
 
You can do it with code builder in each group of the report where the fields are.

1. In you report design "right click" on the Group Header (or Detail tab, or Reports Footer Tab) or wherever the fields are that you want to be dynamic.

2. Click "Build Event" then "Code Builder" and Access will give you a start and end of function. eg:


Private Sub GroupFooter1_Format(Cancel As Integer, FormatCount As Integer)

End Sub


In this function: i.e. before the "End Sub" you give your criteria and what you want to be done.

So on my assumption that your field text box is called "STATUS" you need to have:

If Me.STATUS.Value = "System Down" Then

Me.STATUS.ForeColor = RGB(255, 0, 0)
Me.STATUS.Bold = True

End If


try this
 
Otis,

Also look up Conditional Formatting. You can use it for forms and reports
without any code.

See Access Help or use the Search Facility here.

Wayne
 
Thanks guys, i will try these options.

I appreciate the help.
 

Users who are viewing this thread

Back
Top Bottom