Conditional Formating in Access 97

J

JavyD

Hello everyone, is Conditional Formating possible in Access 97 Reports. I
have a few reports and I would like to highlight values that are less or
equal to 0. Please help, thanks.
 
A

Allen Browne

A97 does not have the conditional formatting feature that was introduced in
A2000.

However, you can set the Format property of a text box so that it shows
negative and/or zero numbers differently. Example:
$#,##0.##[black];-$#,##0.##[red];
 
J

JavyD

This is great, instead of formating the text, how can I change the background
of the text box as the conditional format?

Allen Browne said:
A97 does not have the conditional formatting feature that was introduced in
A2000.

However, you can set the Format property of a text box so that it shows
negative and/or zero numbers differently. Example:
$#,##0.##[black];-$#,##0.##[red];

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.
JavyD said:
Hello everyone, is Conditional Formating possible in Access 97 Reports. I
have a few reports and I would like to highlight values that are less or
equal to 0. Please help, thanks.
 
R

Rick Brandt

JavyD said:
Thanks roger, bu this is for a form, I have a report.

Reports are even easier. Just use code in the format event of the
appropriate section to change whatever properties you want.
 
R

Roger Carlson

Then all you need is a simple If statement in the On Format event of your
Detail Section, very much like the Single Form example on the sample
database I mentioned. Something like this:

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Me.txtBal < 0 Then
Me.txtBal.BackColor = vbRed
End If
End Sub

--
--Roger Carlson
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L
 
A

Allen Browne

Use code like Roger gave you.

You may need an "Else" in the If block, to change it back if the condition
is not met.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

JavyD said:
This is great, instead of formating the text, how can I change the
background
of the text box as the conditional format?

Allen Browne said:
A97 does not have the conditional formatting feature that was introduced
in
A2000.

However, you can set the Format property of a text box so that it shows
negative and/or zero numbers differently. Example:
$#,##0.##[black];-$#,##0.##[red];

JavyD said:
Hello everyone, is Conditional Formating possible in Access 97 Reports.
I
have a few reports and I would like to highlight values that are less
or
equal to 0. Please help, thanks.
 
R

Roger Carlson

Good catch on the "Else", Allen. I should have thought of that. <grimace>

--
--Roger Carlson
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L

Allen Browne said:
Use code like Roger gave you.

You may need an "Else" in the If block, to change it back if the condition
is not met.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

JavyD said:
This is great, instead of formating the text, how can I change the
background
of the text box as the conditional format?

Allen Browne said:
A97 does not have the conditional formatting feature that was introduced
in
A2000.

However, you can set the Format property of a text box so that it shows
negative and/or zero numbers differently. Example:
$#,##0.##[black];-$#,##0.##[red];

Hello everyone, is Conditional Formating possible in Access 97 Reports.
I
have a few reports and I would like to highlight values that are less
or
equal to 0. Please help, thanks.
 
Top