I have 2 fields on a form datein and duedate. Users are entering a duedate which I dont want to be less that the indate. For example if today is 9/20/04, the user's should not be able to enter 9/15/04. What I'm stuck on is how to code the duedate to allow for 3 days. So if today is 9/20/04, the due date can't be 9/21/04, 9/22/04, or 9/23/04.
This is the code I have:
If DateDiff("d", Me.DueDate, Me.dateIn) >= 3 Or DueDate <= dateIn Then
MsgBox "You must allow 3 days to process all requests.", vbExclamation, "Improper Date"
Me.DueDate.Undo
Cancel = True
End If
End Sub
What am I doing wrong?
This is the code I have:
If DateDiff("d", Me.DueDate, Me.dateIn) >= 3 Or DueDate <= dateIn Then
MsgBox "You must allow 3 days to process all requests.", vbExclamation, "Improper Date"
Me.DueDate.Undo
Cancel = True
End If
End Sub
What am I doing wrong?