• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 610
  • Last Modified:

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

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
pabrann
Asked:
pabrann
2 Solutions
 
Rey Obrero (Capricorn1)Commented:
you can get the current year with

=year(date())
or

=year(now())
0
 
PatHartmanCommented:
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
 
pabrannPresidentAuthor Commented:
Thank you both very much.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now