Conditional formatting problem

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have written a very complex report. Its not a normal report. I build a
custom table which just consists of detal lines. Hundreds of SQL calls are
used to build this table. This table becomes the report control source. My
problem is that the first column needs to print as bold or normal under
programmatic control. The conditional formatting feature is useless as it has
only 3 conditions. Ideally, I'd like to be able to specify the formatting of
columns as I load the table. Is there any way to achieve this ? I tried
setting up two extra columns called Heading and Sub Heading but don't see how
I can use them as I don't want the sequence of my built table to be altered
as happens when I specify sorting and grouping. I'm using Access 2000.
 
Here is something I got from Fred in a previous post.
All versions can use the Format event of the report section
to change
the backcolor, forecolor, etc. when the report is run.

If [AField]>0 Then
[AField].BackColor = vbBlue
[AField].ForeColor = vbYellow
Else
[AField].BackColor = vbWhite
[AField].ForeColor = vbBlack
End If

You can also, in all versions, use a control's Format
property to
change the forecolor of the control under certain
conditions (if the
field is a Number datatype).

Set the control's Format property to:
#[Blue];-#[Red];0[Black]
to show positive values in blue, negative values in red,
and zero
values in black.

See Access Help files:
Format property + Number and currency datatype
 
Back
Top