I IanT Registered User. Local time Today, 20:12 Joined Nov 30, 2001 Messages 191 Jun 27, 2007 #1 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
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
boblarson Smeghead Local time Today, 12:12 Joined Jan 12, 2001 Messages 32,040 Jun 27, 2007 #2 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
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