Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Format a TextBox for Date Entry 1

Status
Not open for further replies.

dvannoy

MIS
May 4, 2001
2,765
0
0
US
Is it possible to create say an input mask for a text box?? I have text boxes that users enter dates into..I would like it to be simple so they dont have to enter the /..

Thanks
 
Have you looked into the Masked Edit Box. Its a separate component which you can add to the project. Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
Thank you...I found that after I posted the question..

Thanks for your response
 
you could even try this one:

private sub text1_lostfocus
if isdate(text1.text) then
text1.text = format(text1.text,"MM/DD/YYYY")
else
msgbox "Invalid date"
text1.setfocus
end if
end sub
 
Have you looked at DateTimePicker Control?
You can easily control display format and output format and it's very easy for the user Let me know if this helps
________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'There are 10 kinds of people in the world: those who understand binary, and those who don't.'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top