-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Supposing each employee record is in the report's Detail section:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If DateDiff("d", Me!HireDate, Date()) <= 90 Then
Me.Detail.BackColor = vbYellow
Else
Me.Detail.BackColor = 16777215
End If
End Sub
On a form you would use the OnCurrent event procedure to set the
background color for whichever control or section you wish.
HTH,
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv
iQA/AwUBP/oHBYechKqOuFEgEQKV8QCg0jQ5aVzkrIzPuoi7qCHDDN3zLYIA oP4h
G6N8d87VdZtHNnWFQ9LmM/jL
=VdnJ
-----END PGP SIGNATURE-----
Scott Sabo wrote:
I have a form & report based on a query which shows details about
employees performance reviews (hire date, review date, review submital
date, etc). We do 90 day probation reviews as well and I want to be
able to indicate employees who have a hire date that is within 90 days
of the current date and highlight their records in the form and report
with a yellow background. How would this be best accomplished using
DateDiff or DateAdd?
Thanks in advance-
Scott