Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Access 2007 - input mask for date

Posted on 2011-09-12
7
Medium Priority
?
482 Views
Last Modified: 2012-05-12
Hi,

I have date field in my access form which is connected to sql server.

Th properties of End Date field is:

Data: controlsource: MyDate
Input Mask: 00/00C9999;0;0
Event: BeforeUpdate: EventProc
AfterUpdate: EventProc
All: Control Source: MyDate

I keep entering date like: 07/01/2010 but it keep saying that mydate is not matching with inputmask format. I have another startdate field which works fine and the only difference for startdate is in event:
BeforeUpdate (EventProc)
On Key Press(Event Proc)...

how can I fix the problem with End date field?

Thanks in advance
0
Comment
Question by:shmz
7 Comments
 
LVL 75
ID: 36526846
Over the years, I have found for the most part, users hate date input masks.  I would suggest ... no date input mask.

For any date in the current year, at most ... the user only has to type mm-dd and hit Enter or Tab.  The current year will automatically added.

mx
0
 
LVL 75

Accepted Solution

by:
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform) earned 2000 total points
ID: 36526861
As far as the Input Mask, I would suspect you want this:

00-00-0000;0;_

mx
0
 
LVL 52

Expert Comment

by:Gustav Brock
ID: 36527584
> Over the years, I have found for the most part, users hate date input masks.

Exactly. They seem to add more trouble and confusion than the error message that pops should the user type something not readable as a date.

/gustav
0
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
LVL 77

Expert Comment

by:peter57r
ID: 36527649
There is no difficult data entry problem which cannot be transformed by the judicious use of an input mask ................................................................................................................................................... into a problem which is a thousand times more difficult!!
0
 
LVL 19

Expert Comment

by:Richard Daneke
ID: 36531331
as relates to your question:
  Why does the End Date call the EventProc afterUpdate and the Start Date call the same EventProc before update?
0
 

Author Comment

by:shmz
ID: 36533606
DoDahD:

I am not familiar with access and I haven't created the form so I appreciate if you let me know what happens as a result of this setting?
0
 

Author Closing Comment

by:shmz
ID: 36555080
Thanks
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

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 …
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
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…

772 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