0
votes

I am using Access 2010 on Win 7 pro.

I am trying to limit the dates returned in a date picker associated with a text box on an access form.

I have created the text box set its format to short date and selected on dates in the show date picker property. So far so good I am seeing the date picker icon next to the field when it has the focus as expected and the date picker is working.

What I am having trouble with is limiting the dates shown in the date picker to only the last two weeks, this is required due to business rules. I can raise an error in the afterupdate event no problems but its not pretty and I would prefer to limit the user to a specified range. I have been all over the web and found many references to how this was done with calendar active x controls and the activex date picker in previous versions. The code to do it is not a problem I just cant find anywhere to limit what the date picker displays.

Any help greatly appreciated

PK

1

1 Answers

0
votes

Have you tried the validation rules on data side of the properties?

There you can set the valid values.

Per example [field1] > '2012-01-01' and [field1] < '2014-01-01'