Conditional Format - alternating line color

T

Tom

Hi:

Using Access2000/2002

I'm trying to design a continuous form with alternating lines colored
(e.g., white, light gray) using conditional formatting. I've used
various schemes I've found in this forum and elsewhere to return
alternating 0 and 1s then set the conditional formatting accordingly.
So far, so good...

The problem is that when I go to add another conditional formatting
item (e.g., to set the backcolor to red if the item is overdue) most
all of the schemes fail miserably - the column comes back white only
for all the records.

The only scheme that seems to work is homebrewed - in the source query
I include a field that calls a UDF called GrayBar (see below). The
problem is that occasionally it returns the same value for consecutive
records and I haven't a clue why.

So, does anybody have a reliable method of alternating row colors in a
continuous form where additional conditional formats may exist. It
would be nice if the underlying recordsource was editable, but that's
not a strict necessity. Yes, I know this can be done very easily in
A2007, but that's not an option for me at this point.

Thanks


'********************************************************************************************************

Public Property Get GrayBar(WorkFlowID As Integer) As Boolean


On Error GoTo ErrHandler
If m_ColorToggle = WorkFlowID Then
GrayBar = m_bGrayBar
Else
GrayBar = Not m_bGrayBar
m_bGrayBar = Not m_bGrayBar
m_ColorToggle = WorkFlowID
End If

ExitHere:
Exit Property
 

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