Solved

Formatting a text box for a Date

Posted on 2001-08-14
6
147 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
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…

706 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

19 Experts available now in Live!

Get 1:1 Help Now