mcdhappy80
Registered User.
- Local time
- Today, 17:52
- Joined
- Jun 22, 2009
- Messages
- 347
Is there a way to prevent user from entering letters in date field text controls (and thus invoking the default access error message)?
I tried using something like this but it doesn't work, the default message still appears:
Thank You.
I tried using something like this but it doesn't work, the default message still appears:
Code:
Private Sub dtePocetakRadnogOdnosa_BeforeUpdate(Cancel As Integer)
If IsNull(Me.dtePocetakRadnogOdnosa) Then
MsgBox ("Morate uneti vrednost u polje Radi Od")
Cancel = True
Else
If IsDate(Me.dtePocetakRadnogOdnosa) Then
If Me.dtePocetakRadnogOdnosa > Now() Then
MsgBox ("Datum zaposlenja mora biti danasnji ili u proslosti!!")
Me.Undo
Cancel = True
End If
Else
MsgBox "Not a date"
Me.Undo
Cancel = True
End If
End If
End Sub