PDA

View Full Version : Stop users entering a future date



keilah
10-26-2007, 04:13 AM
Question: Hi experts

Is there a way to stop any user picking a date in the future. I have a calander in a access form which users select for the date when they have accessed the form.

But what i am looking for is a validation command to stop users pick a future date.....is possible

icthus123
10-26-2007, 04:34 AM
Question: Hi experts

Is there a way to stop any user picking a date in the future. I have a calander in a access form which users select for the date when they have accessed the form.

But what i am looking for is a validation command to stop users pick a future date.....is possible

Without checking this would something along the lines of


If dteDate > Date() Then Whatever


work?

DarkSprout
10-26-2007, 04:45 AM
Or ...

If DateDiff("d", [dteInputDate], Date) < 0 Then
MsgBox "Please Enter Past Or Present Date"
Exit Sub
End If