Use the IsDate() function to test if something can be interpreted as a date.
Example:
If IsDate(Me.[Text1]) Then
MsgBox "Okay, that can be understood as a date."
End If
Use CDate() to force Access to treat something as a date (typecast).
For an example, see:
Calculated fields misinterpreted
at:
http://allenbrowne.com/ser-45.html
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Reply to group, rather than allenbrowne at mvps dot org.
JOM said:
Can someone please tell me the difference between cdate and isdate and
when
to use or when not to use anyone of them...
Thanks!