[AccessD] BackColor of Labels on a Report

Gustav Brock Gustav at cactus.dk
Tue May 17 05:03:43 CDT 2005


Hi Joe

Seems like you need to track the values of (TotCount * minAQL) ...

/gustav

>>> JRojas at tnco-inc.com 05/17 12:09 am >>>
Hi All,

I have a report with 13 label boxes in the detail section of the
report.
I perform a calculation in the Detail_Print sub routine.
The result of this calculation determines whether the BackColor of
each
label box is either White (16777215) or Grey (12632256).
This calculation is performed for each label box each time the
Detail_Print
routine is ran. This is intentional.

The problem that I am having is that the label boxes do not have the
correct
BackColor displayed on the screen nor is it correct when printed.
In fact my second column is the only one that appears correct. All the
others remain at there default color, white.

I stared at my calculations for a long time and test many different
things
but with no luck.

Here is my code snipet that runs in the Detail_Print routine:
For idx = 1 To 13      
        If (TotCount * minAQL) = 1 Then
            Me("lblM" & idx).Caption = "1;" & Me("lblAQL" & idx).Tag
            Me("lblM" & idx).BackColor = 16777215
        ElseIf Me("lblAQL" & idx).Tag = "0" Then
            Me("lblM" & idx).Caption = "0;" & Me("lblAQL" & idx).Tag
            Me("lblM" & idx).BackColor = 12632256
        ElseIf ((TotCount * minAQL) Mod CInt(Me("lblAQL" & idx).Tag)) >
0
Then
            Me("lblM" & idx).Caption = ">0;" & Me("lblAQL" & idx).Tag
            Me("lblM" & idx).BackColor = 12632256
        Else
            Me("lblM" & idx).Caption = "Z;" & Me("lblAQL" & idx).Tag
            Me("lblM" & idx).BackColor = 16777215
           
        End If
Next

The Me("lblM" & idx).Caption = "1;" & Me("lblAQL" & idx).Tag lines are
for
debugging.

Anyone see anything glaring that would cause this?

Thanks!
JR




More information about the AccessD mailing list