majid.pervaiz
Registered User.
- Local time
- Today, 04:40
- Joined
- Oct 15, 2012
- Messages
- 110
Dear All,
I have the below code on a field that contains a date, I don't want user to enter a future date in the field. But unfortunately, it's not working, not sure the reason.
I tried the same on lost focus event also.
appreciate your advice.
Private Sub BO_App_Date_Exit(Cancel As Integer)
If Me.BO_App_Date > Date Then
MsgBox "you cannot put future date", vbExclamation
Me.BO_App_Date.Value = ""
End If
End Sub
I have the below code on a field that contains a date, I don't want user to enter a future date in the field. But unfortunately, it's not working, not sure the reason.
I tried the same on lost focus event also.
appreciate your advice.
Private Sub BO_App_Date_Exit(Cancel As Integer)
If Me.BO_App_Date > Date Then
MsgBox "you cannot put future date", vbExclamation
Me.BO_App_Date.Value = ""
End If
End Sub