Extra Conditional Formatting

G

Guest

I am using Access 2003 and I am trying to use conditional formatting in a
report to highlight the primary categories with a different color. The report
is for a library and the primary categories are sorted by binder i.e.
MAGS-01, MAGS-02, etc. I want all of the categories starting with MAGS
colored differently from all of the other categories. The problem is that I
have 11 categories but conditional formatting only allows me to assign up to
four values. Is there a way to assign extra conditional formatting, or
another way to accomplish this entirely?
 
F

fredg

I am using Access 2003 and I am trying to use conditional formatting in a
report to highlight the primary categories with a different color. The report
is for a library and the primary categories are sorted by binder i.e.
MAGS-01, MAGS-02, etc. I want all of the categories starting with MAGS
colored differently from all of the other categories. The problem is that I
have 11 categories but conditional formatting only allows me to assign up to
four values. Is there a way to assign extra conditional formatting, or
another way to accomplish this entirely?

In a report?
Don't bother with Conditional Formatting.

You can use code in the Format event of whatever section the
Categories control is in:

If Me.Categories = "Mags-01" then
Me.Categories.ForeColor = vbBlue
ElseIf Me.Categories = "Mags-02" then
Me.Categories.ForeColor = some other color
ElseIf .... etc ...
Else
Me.Categories.ForeColor = vbBlack
End If

Note: you can also use Select Case as well as other methods to
associate the ForeColor with the Categories value.
 
G

Guest

Is there a way to use placeholders instead of typing out each individual
category? i.e. instead of typing out "Mags-01", "Mags-02", etc. just use
"Mags-*" or something similar then applying the color to all categories that
meet that criteria. There are only 11 main categories: Mags, Books, etc., but
there are roughly 200 binders total so do I need an ElseIf function for each
binder?

Lastly, where would I input this code at? The event tab under properties is
just a white screen with nothing to select, and under the format tab I don't
see an event field.

Thank you for your help.
 

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