Conditional Formatting in Access 97

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.
 
R

Rick Brandt

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top