I have many date fields that I want to validate a range for. I created this function to pass in the text so that it will verify the date and then display a message if it is out of range then cancel the change so it isn't committed.
Private Sub txtInDate_BeforeUpdate(Cancel As Integer)
ValidationRFQDates (txtInDate)
End Sub
Private Sub ValidationRFQDates(txtField As TextBox)
If (DateValidation(txtField) = 0) Then
MsgBox "Date Must be Greater Than 1/1/1999 and Less Than " & DateAdd("yyyy", 10, Date)
Cancel = True
txtField.Undo
End If
End Sub
I keeps telling me "Object Required" on ValidationRFQDates (txtInDate)
Thank You
Private Sub txtInDate_BeforeUpdate(Cancel As Integer)
ValidationRFQDates (txtInDate)
End Sub
Private Sub ValidationRFQDates(txtField As TextBox)
If (DateValidation(txtField) = 0) Then
MsgBox "Date Must be Greater Than 1/1/1999 and Less Than " & DateAdd("yyyy", 10, Date)
Cancel = True
txtField.Undo
End If
End Sub
I keeps telling me "Object Required" on ValidationRFQDates (txtInDate)
Thank You