Conditional Formatting in Access 97

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

Guest

I want to be able to conditionally format a report in an Access 97 database.
Is this at all possible from within Access 97 eg can I grab the code from an
Access 2000/02/03 version of the same database and save it in the relevant
place within tthe Access 97 file?

Thanks in advanace.
 
Steve said:
I want to be able to conditionally format a report in an Access 97
database. Is this at all possible from within Access 97 eg can I grab
the code from an Access 2000/02/03 version of the same database and
save it in the relevant place within tthe Access 97 file?

Thanks in advanace.

Access 97 doesn't have conditional formatting, but it is not required in a
report anyway. Since reports are processed in a sequential fashion you can use
the VBA code in the Format event of the sections to change the appearance of
report elements by testing the values of certain fields in the code.

EX:

If Me!DueDate < Date() Then
Me!DueDateControlName.BackColor = 255
Else
Me!DueDateControlName.BackColor = 0
End If

The above would make any date less than today appear in red.
 
Back
Top