How to Check Valid Date

RAHUL

New member
Local time
Today, 14:49
Joined
Oct 1, 2004
Messages
5
Hi ,
I want to check date inserted is valid or not.
I applied input mask and validation rule =isdate. But it is saying invalid date for every date i have entered..
SO :confused:
 
I'm guessing you can't use =isdate as a validation rule.
What you could do though is use something like >=#01/01/1900# (or any other arbitrary date ages before any of the dates that will be entered).

Thinking about it though, if you've got the data type set to date/time it won't allow non-date/time values to be entered anyway.
 
Last edited:
>>>

strdate = InputBox("insert the date!")
If IsDate(strdate) Then
MsgBox "DATE"
Else
MsgBox "NOT DATE"
End If
 
Use the AfterUpdate event of your text box.

Code:
If Not IsDate([YourTextBox]) Then
     MsgBox "Invalid date!"
Else
     'do nothing, date is OK
End If
 

Users who are viewing this thread

Back
Top Bottom