Home > Support > Hints and Tips > Tip of the Week

Weekly Computer Tip # 130
15 October 2005

Start each week with a free tip

To subscribe, please type your email address in the box below:

Prevent a user from entering a date that occurs in the future (Microsoft Access)

This week I did a one-to-one Microsoft Access training session with a lovely lady from one of the local Colleges. (Hi, Vicky!) Astute readers of this series know I tend to ask "What is your favourite tip you picked up today?" Vicky's is "Using the space bar for yes/no boxes!" (See http://www.roem.co.uk/tip_115.html if you missed it.)

One of my favourite features we worked on that day was something Vicky asked for ... can you prevent people accidentally entering dates in the future? For example, can I let the system warn me when I enter an invoice date that occurs in the future? Yes you can!

Here's how:

  1. Open the table in Design view
  2. In the upper portion of the window, click the relevant date field
  3. In the lower portion of the window on the General tab, click the ValidationRule property box
  4. Type <=Date()
  5. In the ValidationText property box, type the message that you want displayed when the rule is broken. (For example "Check date!")

In future, only the current and any previous dates will be accepted, ensuring accurate data entry. After all, we're only human!

Until next week.

Karen
Email this page to a friend

Enter recipient's email address in the box below:



PS I’m committed to sharing the best of what I know with others so please don’t keep me a secret. If you enjoyed today’s tip, please forward it to anyone you feel may benefit. Alternatively, feel free to reprint it (with full copyright and subscription information) in your newsletters and message boards.


Home   Training   Support   Clients   Contact Details   News   Disclaimer  

© Roem Ltd. All Rights Reserved
October 2005