preventing future dates from being entered into a field

F

fascal

Hi,

I need to prevent users from being able to enter in future dates into a date
field. Has anyone found syntax that performs this function.

So, the logic should be that <=todaysdate

Any ideas?
 
A

Alex Dybenko

Hi,
I would use textbox BeforeUpdate Event:

if me.MyTexbox > date+1 then
msgbox "Wrong date!"
cancel=true
end if
 
A

Allen Browne

Where did you try this expression?

The idea is to open your table in design view.
Select the date field.
In the lower pane of table design, place the expression beside the
Validation Rule property.
 
Top