Solved

Formatting a text box for a Date

Posted on 2001-08-14
6
150 Views
Last Modified: 2010-05-02
i have a text box on a form where i would like users to enter in a date. ie.  08/14/2001. I would like to have the "/" already in the text boxes so users would only have to enter in the numbers. Any suggestions?
0
Comment
Question by:Maxim10553
  • 3
  • 2
6 Comments
 
LVL 11

Accepted Solution

by:
Otana earned 50 total points
ID: 6384461
use the Microsoft masked edit control. set the inputmask to ##/##/####.
0
 
LVL 14

Expert Comment

by:wsh2
ID: 6384509
masked edit control (as stated by Otana)

or

calendar control

or

Use three Textbox's

and/or

trap the Textbox's keydown event.. testing for only numeric entry.. along with a test for the length of the entered text.. so that you can then dynamically add the slashes where they belong.
0
 
LVL 3

Author Comment

by:Maxim10553
ID: 6384579
thanks guys. exactly what i was looking for
0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
LVL 3

Author Comment

by:Maxim10553
ID: 6384605
hey, one more thing. what about a price format. any suggestions on that? guessing the input mask has to be dynamic in nature. ie $10.10, $1000.10, $ 10000.10
0
 
LVL 14

Expert Comment

by:wsh2
ID: 6384855
Tip.. Dollar signs only make your data harder to read.. cluttering your presentation. If a field is dollar.. place the dollar symbol in a Label caption next to your text box.
0
 
LVL 3

Author Comment

by:Maxim10553
ID: 6384965
thanks, threw some points up for you. will try what you said
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Windows 10 start screen issues 9 55
VBA filters 2 61
VBA Shell can't Find Word document 11 94
Help me. 3 55
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

777 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