Runtime error 3316

J

John

Receiving a runtime error 3316 when typing a date into a form.
The validation rule is >=Date()
The validation text is Must be Today or Later

When the date is entered a box appears stating Visual Basic Error 3316
Must be Today or Later

The form is a textbox with the underlying table set to short date.

Thanks for your help
 
M

Michel Walsh

Hi,


Check if inverting the day and the month works, as input. Generally, it
should be accordingly to the regional setting, if you capture the date from
a user access point. As example, try the 8-8-2004, if it works, then try
11-6-2004, if it does not work, maybe you regional setting is NOT
mm-dd-yyyy, but dd-mm-yyyy, or something else. BE SURE to use both day and
month values below 13, else, if OLEAUT32.dll see a number > 12, it will
understand it as a month, whatever is the regional setting. Using 11-6-2004
is a good candidate since it would kick for the sixth of November, future,
or for the eleventh of June, past. Use a four digit for the year, just to be
sure the year part is not involved in the imbroglio.

If you find that the regional setting is different than what the end
user assumed, inform the end user to change his/her regional setting for
date and time (do NOT force it in YOUR program, that will make your program
behaving differently than other programs, like Excel, etc.)


Hoping it may help,
Vanderghast, Access MVP.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top