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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

BOLD FORMAT FOR CANCELLED 1

Status
Not open for further replies.

Angelique

Technical User
Mar 9, 2001
127
AU
Can you make a field "Bold" on a report if the value is "Cancelled"? If so, where do you add the code? silly question I know but I have tried "Open Form" and "Activate" but the control doesn't have the value at the time I open the report.



Angelique
 
Try the OnFormat event with your code.
Joe Miller
joe.miller@flotech.net
 
Worked great! even have different colours.

Angelique
 
Angelique and Joe:

Will you include the code that you used as an example.

For instance, if the field CHEFFDATE is a date that is less the EXPDATE, I would like to bold and change the color of the POLNUM field to emphasize a change made in the current policy term.

How do you code this. Thank you very much for your help.
 
In the Report Details --> OnFormat create an event procedure.

My code can be adapted:

Private Sub Detail_Format(Cancel as Integer, FormatCount as Integer)

'Check whether the control, a combo box is empty
'if it isn't then proceed

If Not isNothing(Me.Status) then
If Me.Status.Value = "Cancelled" then 'meet a condition
Me.Status.ForeColor = 255 'red
Me.Status.FontSize = 10 'bigger
Me.Status.FontBold = True ' make bold
Else
If Me.Status.Value = "Confirmed" then 'alternative
Me.Status.ForeColor = 16711680
Me.Status.FontSize = 8
Me.Status.FontBold = False
End if
End if
End if

Hope this helps.


Angelique
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top