Highlighting fields

saintsman

Registered User.
Local time
Today, 02:13
Joined
Oct 12, 2001
Messages
138
I've got a simple bit of code but I keep getting an error message.

"You entered an expression that has no value.The expression may refer to an object that has no value, such as a form , report or a label control."

All I wish to do is highlight the fact that my forecast date is overdue.

Private Sub Report_Open(Cancel As Integer)

Select Case Me.Date_Forecast

Case Is < Date


Me.Date_Forecast.FontBold = True
Me.Date_Forecast.ForeColor = 255

Case Else
'don't do anything, print with normalreport font.
End Select

End Sub


Once again your help will be appreciated.
 
Copy this code to the reports detail
Code:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)

If Me.Date_Forecast < Date Then
Me.Date_Forecast.FontBold = True
Me.Date_Forecast.ForeColor = 255

Else

Me.Date_Forecast.FontBold = False
Me.Date_Forecast.ForeColor = 0

End If

End Sub
IMO
 
Thanks IMO,

Sorry to ask again but where exactly do you mean when you say the report's detail?
 
Open the report in Design view, Goto Tools >>> View >>> Code and paste the code in there.

IMO
 
Simple when you know how.

Thank you for your help IMO.

Saintsman
 
You're welcome

IMO
 

Users who are viewing this thread

Back
Top Bottom