Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Conditional Formatting in Access 97 1

Status
Not open for further replies.

DanAtCDS

Technical User
May 20, 2003
22
US
I need to set conditional formatting for a given field on my report which will "flag" records that exceed a user defined threshold. The code I've tried to use follows but gives a run-time error 2447 "there is an invalid use of the .(dot) or ! operator or invalid parentheses"
Code:
If [PercRejected] > [DetailThreshold] Then
    [PercRejected].BackColor = 4227327 'orange
Else
    [PercRejected].BackColor = 16777215 'white
End If
Any help is greatly appreciated!!
 
Assuming all the fields are on the same report, try adding:

Me!

before each field name

If Me![PercRejected] > Me![DetailThreshold] Then
Me![PercRejected].BackColor = 4227327 'orange
Else
Me![PercRejected].BackColor = 16777215 'white
End If


****************************
Only two things are infinite, the universe and human stupidity,
and I'm not sure about the former. (Albert Einstein)

Robert L. Johnson III
MCSA, CNA, MCP, Network+, A+
w: robert.l.johnson.iii@citigroup.com
h: wildmage@tampabay.rr.com
 
Thank you for your time!!!
It worked great! (Or at least the way I had anticipated it working in the first place!)

Thanks Again!
Dan Flaherty
CDS,Inc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top