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

Access Report formatting by date

Status
Not open for further replies.

adamdunko

Technical User
Apr 18, 2003
10
US
I want to change the background color of a record in a report if the date field has already passed.. Not sure how to do this. Please help!~
 
you need to enter code in the form behind the report.
I usually use one of the Header On_format section and type something like:

If Me.txtDate > Date() Then
Me.txtDate.Backcolor = 255 ' Red
Else
Me.txtDate.Backcolor = 16777215 ' White
End if
 

If this report is more than one page (record) you should create an iif() statement in a field on the page header section that evaluates the date and takes action.
 
You could also perform the code in the detail section. See this thread: thread703-527296
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top