Textbox on form

IanT

Registered User.
Local time
Today, 20:12
Joined
Nov 30, 2001
Messages
191
Hi
I have a textbox on a form where a date will be input, I need code to validate that a date has been input into the textbox, can anyone help!

Ta
 
In the text box's Before Update event you can put
Code:
If Not IsDate(Me.YourTextBoxNameHere.Text) Then
    MsgBox "You did not enter a valid date", vbExclamation, "Entry Error"
    Cancel = True
    Me.YourTextBoxNameHere.Undo
End If
 

Users who are viewing this thread

Back
Top Bottom