R
Ray
I want to highlight the background color to red in 7 days before and after
the date in the field of [Next] with following code in the even procedure of
On Print in Detail Section of the report without success. Your advice is
appreciated.
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
If Date - Me.[Next] >= -7 And Date - Me.[Next] <= 7 Then
Me![Next].BackColor = vbRed
Me![Next].ForeColor = vbWhite
Me![Next].FontBold = True
Else
Me![Next].BackColor = vbWhite
Me![Next].ForeColor = vbBlack
Me![Next].FontBold = False
End If
End Sub
Thanks,
Ray
the date in the field of [Next] with following code in the even procedure of
On Print in Detail Section of the report without success. Your advice is
appreciated.
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
If Date - Me.[Next] >= -7 And Date - Me.[Next] <= 7 Then
Me![Next].BackColor = vbRed
Me![Next].ForeColor = vbWhite
Me![Next].FontBold = True
Else
Me![Next].BackColor = vbWhite
Me![Next].ForeColor = vbBlack
Me![Next].FontBold = False
End If
End Sub
Thanks,
Ray