What's wrong with this VBScript code??? I've been looking at it for the last hour and can't find what's wrong with it. I've triple-checked all my calls and variables, etc. but everytime a date which is less than NOW is entered into the date field (txtAppDateMoved) it thinks that the date is higher and triggers the second message box.

I'm going CRAZY!!!

code:


Sub txtAppDateMoved_onchange
Dim bDateGood
Dim Mydate

Mydate = Now
bDateGood = IsDate(txtAppDateMoved.Value)


If bDateGood = False Then
MsgBox "Please enter a valid date as 'mm/dd/yyyy' in the Date Moved field.", vbOKOnly, "Error"
txtAppDateMoved.focus
ElseIf txtAppDateMoved.Value > Mydate Then
MsgBox "The date entered is past today's date. Please correct.", vbOKOnly, "Error"
txtAppDateMoved.focus
Else
txtAppDateMoved.Value = FormatDateTime(txtAppDateMoved.Value)
End If
End Sub