ClowneUser
MIS
Hi,
We have a database that records all the calibration equipment we have, and the dates that they need recalibrating, I've been trying to get it to change the border colour from green to red if the date has passed. I set the border colour on the form to be green, but then in vb set it to red if the date has passed current date.
I've tried a few different things hence the remarked out code, but nothing I've tried seems to work.
The database is Access 2000
Any ideas what I need to do to achieve this?
Thanks,
Mick.
We have a database that records all the calibration equipment we have, and the dates that they need recalibrating, I've been trying to get it to change the border colour from green to red if the date has passed. I set the border colour on the form to be green, but then in vb set it to red if the date has passed current date.
Code:
Private Sub Combo2_AfterUpdate()
strElementName = Me!Combo2.Column(1)
strElementDescription = Me!Combo2.Column(2)
strElementSize = Me!Combo2.Column(3)
lngFrequency = Me!Combo2.Column(4) 'Frequency of Check
Text61 = Me!Combo2.Column(7) 'Next calibration
'lngRed = RGB(255, 0, 0)
'lngGreen = RGB(0, 255, 0)
If Text61 < Date Then
Box72.BorderColor = RGB(255, 0, 0)
'Else
'Box72.BorderColor = lngGreen
End If
Text92 = Me!Combo2.Column(8) 'Checked By
Text8 = Me!Combo2.Column(10) 'Certificate Number
strElementName.Visible = True
strElementDescription.Visible = True
strElementSize.Visible = True
lngFrequency.Visible = True
Text8.Visible = True
Text92.Visible = True
Box72.Visible = True
Box35.Visible = True
Label31.Visible = True
Label34.Visible = True
Label37.Visible = True
Label38.Visible = True
Label69.Visible = True
Label70.Visible = True
Label71.Visible = True
Text61.Visible = True
I've tried a few different things hence the remarked out code, but nothing I've tried seems to work.
The database is Access 2000
Any ideas what I need to do to achieve this?
Thanks,
Mick.