Conditional Formating with access 97

Liz_I3

Well-known Member
Joined
Dec 30, 2002
Messages
647
Office Version
  1. 2016
Platform
  1. Windows
Iam working with access97 and would like to format a field in a Report (the report is a main report with a sub report) based on a condition. I have 2 fields TransMain(on the main report) and TransNo (on the sub report). If transNo does not equal TransMain then I want TransNo to be Bold. I can do this very easily in access2000 but cannot get the code or even where to enter the code in access97. Would appreciate any help
Thanks Liz
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Unfortunately, Access97 does not have any conditional formatting. So, you have to put some code in the On Format event procedure in the detail section of the report.
Something like this should work. I have tried it out on my machine an it works a treat.

If (Reports![TransMain]![TransNo].Report![TransNo]) <> (Reports![TransMain]![TransMain]) Then
Reports![TransMain]![TransNo].Report![TransNo].FontBold = True

Make sure you get the syntax right. The syntax is:

Reports![main report name]![subreport control name].Report![Control name]

David
 
Upvote 0
David thank you very much, this is a big help I was quit lost as to were to even put the code.

thanks agian
Liz
 
Upvote 0

Forum statistics

Threads
1,221,503
Messages
6,160,195
Members
451,630
Latest member
zxhathust

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top