?
Solved

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

Posted on 2014-03-24
3
Medium Priority
?
603 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 120

Assisted Solution

by:Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1) earned 400 total points
ID: 39950602
you can get the current year with

=year(date())
or

=year(now())
0
 
LVL 38

Accepted Solution

by:
PatHartman earned 1600 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

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
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…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

752 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