Hi
I'm trying to use the following code (modified from something WayneRyan kindly sent me a while back) to get the text in the date/text box to flash red when the membership expiry date is close (within 30 days):
Can anyone see where i'm going wrong? It doesn't go red, or flash (like they should when the date is close) and also i get an error 438 'object doesn't support property or object' when viewing some empty fields.
Anyone have any idea? I have set the timer interval to 1000.
Many thanks
Eddie
I'm trying to use the following code (modified from something WayneRyan kindly sent me a while back) to get the text in the date/text box to flash red when the membership expiry date is close (within 30 days):
Code:
Private Sub Form_Current()
If Abs(DateDiff("d", Me![MembershipExpiryDate], Date)) < 30 Then
Me![MembershipExpiryDate].ForeColor = 255
Else
Me![MembershipExpiryDate].ForeColor = 0
End If
End Sub
Private Sub Form_Timer()
If Me![MembershipExpiryDate].Visible = True Then
Me![MembershipExpiryDate].Visible = False
Else
Me![MembershipExpiryDate].Visible = True
End If
End Sub
Can anyone see where i'm going wrong? It doesn't go red, or flash (like they should when the date is close) and also i get an error 438 'object doesn't support property or object' when viewing some empty fields.
Anyone have any idea? I have set the timer interval to 1000.
Many thanks
Eddie