Solved

Microsoft Access 2010 How to automatically enter the year when entering day and month in text box

Posted on 2014-03-24
3
586 Views
Last Modified: 2014-03-24
I have a client that wants to streamline data entry for date fields in text boxes. They want to type in the day and month and then press enter to automatically display the current year and complete the date field.
0
Comment
Question by:pabrann
3 Comments
 
LVL 119

Assisted Solution

by:Rey Obrero
Rey Obrero earned 100 total points
ID: 39950602
you can get the current year with

=year(date())
or

=year(now())
0
 
LVL 34

Accepted Solution

by:
PatHartman earned 400 total points
ID: 39950606
This is the default behavior if you do not use input masks.  I never use input masks for dates.  I find them clunky and they require the user to enter the entire date.  They also prevent the use of the date picker.  As long as a field is defined as a date data type, Access will not accept invalid data in the field.

Typing in 3/24 {tab} will result in 3/24/2014 as a date.

I don't like using enter to tab to the next field.  That's probably a hang-up from using a typewriter but {Enter} means new line to any one old enough to remember typing.
0
 

Author Closing Comment

by:pabrann
ID: 39950629
Thank you both very much.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now