Expression has no value

keving99

Registered User.
Local time
Today, 00:02
Joined
May 13, 2007
Messages
14
I have a field on a report i want to change the forecolor if its value is 0, the field is a number field.
I have the follwoing code in the on open section

If Nz(Me!Txt1, 0) = 0 Then
Txt1.ForeColor = RGB(0, 255, 0)
End If

When i open the report i get
Run-time error'-2147352567 (80020009)
You entered an expression that has no value

There are records for the report and i have some on no data code.
 
Have you tried just using Conditional Formatting?
 
Have you tried just using Conditional Formatting?

RuralGuy, yes i did that first, but the report is exported to HTML and it gets lost on conversion.

Thanks
 
Use the DetailPrint event rather than the Open event of the report.

Edit: That would be the Print event of the Detail section of the report.
 
Thanks RuralGuy, fantastic, it works and it keeps its formating when converted to HTML.
Nice one :D

KevinG
 

Users who are viewing this thread

Back
Top Bottom