Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Validation Rule for Date Field Text Box

Status
Not open for further replies.

SeanB

Programmer
Joined
Jul 19, 2001
Messages
70
Location
US
Does anyone know the validation rule I would use to check that the entered text is a date. I already have a input mask ##/##/####. Is this the best way to validate the date on the form itself? Thanks
 

Two ideas that work.[ol][li]Change the format of the text box to Short Date and allow access to validate the date automatically.
[li]Remove formatting from the textbox. In the After Update event of the text box use the IsDate function to test for the validity of the date.

If Not IsDate(TxtMyDate) Then
Msgbox "Invalid date!"
End If[/ol] Terry Broadbent

"The greatest obstacle to discovery is not ignorance -- it is the illusion of knowledge." - Daniel J Boorstin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top