We have instruments that are calibrated yearly, I have written a small database to keep the records.
On my report I have written the following to change the font colour to red if the calibration due date has been exceeded, this works fine.
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Me.Text42 >= Me.CalibrationDue Then
Me.CalibrationDue.ForeColor = vbRed
Else
Me.CalibrationDue.ForeColor = vbBlack
End If
End Sub
(text.42) is a hidden field on the report which will always hold the current date
What I would like to do, is that at any time I open the report if I am within 30 days of the calibration due date, then the font of the calibration due date is green, this is just to warn me that the instrument is due for calibration, hope I have explained my problem.
Thank you.
On my report I have written the following to change the font colour to red if the calibration due date has been exceeded, this works fine.
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Me.Text42 >= Me.CalibrationDue Then
Me.CalibrationDue.ForeColor = vbRed
Else
Me.CalibrationDue.ForeColor = vbBlack
End If
End Sub
(text.42) is a hidden field on the report which will always hold the current date
What I would like to do, is that at any time I open the report if I am within 30 days of the calibration due date, then the font of the calibration due date is green, this is just to warn me that the instrument is due for calibration, hope I have explained my problem.
Thank you.