Report based on the text in a fieldname.

isabel2005

Registered User.
Local time
Yesterday, 22:33
Joined
Oct 6, 2005
Messages
19
Hi,

If my language fieldname is English, I want the report text in Blue. Otherwise, black.

I did this but got errors. Any help?


Private Sub Report_Open(Cancel As Integer)
If (CategoryName = "NONE") Then
[CategoryName].TextColor = "000000"
Else
[CategoryName].TextColor = "FFFFFF"
End If
End Sub

Is there a way for me to do this in the report?

Thanks,
Isabel
 
Last edited:
Actually the easiest solution is Conditional Formatting. If you want to use code, the appropriate event is the Format event of the section containing the control.
 
It worked awesome with conditional formatting.

Thank you!!!!
 
Glad it worked out for you. As long as you don't have too many conditions, it's the simplest solution.
 

Users who are viewing this thread

Back
Top Bottom