i have a calculated percent displayed in a report. i need the actual number to appear black/bold if it is positve, and red/bold if it is negative. the VB ForeColor, and Font properties do not seem to be supported here. any suggestions would be helpful.
say if your % field in the reprot is 'Value' then the following code in Detail_Format will work fine:
Me!Value.FontBold = True
If Me!Value > 0 Then
Me!Value.ForeColor = RGB(0, 0, 0)
Me!Value.ForeColor = RGB(255, 0, 0)
In the report design mode,
1. select the section in which this percentage value is printed (Detailed section or Page Header etc.,)
2. right click the section (not the field 'value') and select properties
3. Go to 'Event' tab.
4. select '...' for On Format event
and this will directly take you to the MS Vb editor with function Detail_Format function code generated.