Solved

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

Posted on 2014-03-24
3
578 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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

I had to do a bit of research to find the answer to this question so I thought I'd share my results.  Due to our outdated mainframe systems, we need to downgrade IE9 to IE8 in order to stay compatible.  We also needed to downgrade Java.  In order to…
Several part series to implement Internet Explorer 11 Enterprise Mode
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

744 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

10 Experts available now in Live!

Get 1:1 Help Now