Invalid Date

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there any way to prevent user entering an invalid date eg., 31/06/05 ?
 
The user will not be able to enter an invalid date if the text box is bound
to a Date/Time field in the table.

If the text box is unbound, set its Format property to Short Date, and
Access will not accept a bad date.

If the date makes no sense to Access, it is likely to spin the date around
and try other combinations. Therefore the example you gave might be
interpreted as 5 June 2031 instead of being rejected as a bad date. You
can't stop it doing that, but you can limit that if you display the year as
4 digits. To do that, open the Windows Control Panel, and choose Regional
Settings. Set your Short Date to:
dd/mm/yyyy

Since you seem to live in a d/m/y country, you might get some help from this
article:
International Date Formats in Access
at:
http://allenbrowne.com/ser-36.html
 

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

Similar Threads

Dlookup 7
date validation 2
Financial Years 1
Before Update 6
Dates 4
sorting a query 7
invalid vertical bar 2
Largest Date 10

Back
Top