| re: Change color of text box when printing report
Thanx this must do perfect...!!
Ps. the check box is also on the report.
Greetings,
Paul
<fredg@example.invalid> schreef in bericht
news:14jj00datp7lm3bt1dtivnghs5g7uhj52g@4ax.com...[color=blue]
> On Sun, 18 Jan 2004 00:37:29 +0100, "Xiphias" <Amberpaul@yahoo.com>
> wrote:
>[color=green]
> >Hi,
> >
> >Im trying to change the color of a text box on a report that im printing
> >from a form.
> >
> >On the form I got a check box that has to tricker the color of that[/color][/color]
textbox[color=blue][color=green]
> >on the printed report.
> >If checked color is red else just black.
> >
> >But I dont know how to do it.
> >
> >I think I have to put the string in the open event of the report, but I[/color][/color]
have[color=blue][color=green]
> >tried some things, but I only get errors :)
> >
> >Please help me...
> >Xiphias[/color]
>
> You haven't said whether or not the Check Box on the form is part of
> the recordsource of the report.
>
> If the Check Box is included in the Report's recordsource...
> To change the color of a control when certain criteria is met, code
> the Format event of the section the control is in, probably in your
> case, the Detail section.
>
> If [CheckBoxName] = -1 Then
> [Controlname].ForeColor = vbRed
> Else
> [ControlName].ForeColor = vbBlack
> End If
>
> If the Check Box is not included in the reports recordsource:
>
> If forms!FormName!CheckBoxName = -1 Then
> [Controlname].ForeColor = vbRed
> Else
> [ControlName].ForeColor = vbBlack
> End If
>
> The Form must be open when the report is run.
>
>
> --
> Fred
>
> Please reply only to this newsgroup.
> I do not reply to personal e-mail.[/color] |