hello
I have the following code which helps restrict a repsonse.
The first part works. i.e if the repsonse is 2009 then it is invalid or 2011+ is valid and can move on.
however the second part where I want it to state IF the repsonse given is 20 years + the current year then it is invalid.
Any help much appreciated!
I have the following code which helps restrict a repsonse.
The first part works. i.e if the repsonse is 2009 then it is invalid or 2011+ is valid and can move on.
however the second part where I want it to state IF the repsonse given is 20 years + the current year then it is invalid.
Code:
Private Sub Entrance_Doors___Flats__Renew_Year__20_LE_AfterUpdate()
If Me.[Entrance Doors - Flats (Renew Year) 20 LE] < Format(Date, "yyyy") Then
MsgBox "Flat Entrance Doors Renew Year Invalid!"
End If
If Me.[Entrance Doors - Flats (Renew Year) 20 LE] = Format(Date, "yyyy") + 20 Then
MsgBox "Flat Entrance Doors Renew Year Invalid!"
End If
End Sub
Any help much appreciated!