[AccessD] BackColor of Labels on a Report

Andy Lacey andy at minstersystems.co.uk
Tue May 17 05:14:16 CDT 2005


Joe
Just a thought but I wonder if you'd have more luck with the code in the
OnFormat rather than the OnPrint.
--
Andy Lacey
http://www.minstersystems.co.uk



--------- Original Message --------
From: Access Developers discussion and problem solving
<accessd at databaseadvisors.com>
To: accessd at databaseadvisors.com <accessd at databaseadvisors.com>
Subject: Re: [AccessD] BackColor of Labels on a Report
Date: 17/05/05 10:07

>
> 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
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
>
>
>
>

________________________________________________
Message sent using UebiMiau 2.7.2




More information about the AccessD mailing list