I have a report which lists the project name and several dates as column headings which I use to track the status of projects.
I would like to compare two columns of dates and if a date in the first column [In] is greater than the second column [Out] the font in the first column switches to red.
This is the code I'm currently using:
If Me.Latest_PER_Correspondence_In > Me.Latest_PER_Correspondence_Out Then
Me.Latest_PER_Correspondence_In.ForeColor = vbRed
Me.Latest_PER_Correspondence_In.FontBold = True
Else
Me.Latest_PER_Correspondence_In.ForeColor = vbBlack
When I run the report some dates from the first column [In]which are earlier than the second column [Out] appear red. For example, in the first column the date 9/20/2006 appears red even though the second column is 10/2/06.
If it matters, the report is run off a query and the fields in the report are formulas I inserted to view the latest date of entry (i.e. Latest PER Correspondence In: Nz([PERRR3],Nz([PERRR2],Nz([PERRR 1],[PERReceived]))).
Appreciate any ideas here.
romann
I would like to compare two columns of dates and if a date in the first column [In] is greater than the second column [Out] the font in the first column switches to red.
This is the code I'm currently using:
If Me.Latest_PER_Correspondence_In > Me.Latest_PER_Correspondence_Out Then
Me.Latest_PER_Correspondence_In.ForeColor = vbRed
Me.Latest_PER_Correspondence_In.FontBold = True
Else
Me.Latest_PER_Correspondence_In.ForeColor = vbBlack
When I run the report some dates from the first column [In]which are earlier than the second column [Out] appear red. For example, in the first column the date 9/20/2006 appears red even though the second column is 10/2/06.
If it matters, the report is run off a query and the fields in the report are formulas I inserted to view the latest date of entry (i.e. Latest PER Correspondence In: Nz([PERRR3],Nz([PERRR2],Nz([PERRR 1],[PERReceived]))).
Appreciate any ideas here.
romann