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!

Char data type to datetime data type

Status
Not open for further replies.

clayton74

Technical User
Apr 17, 2002
187
0
0
GB
I have a textbox that I would like the data type to be a datetime type instead of a char data type. Any help would be appreciated
 
A textbox contains, per definition, text. You can regulate what kind of text is entered using validations in various events (textbox1_change, textbox1_exit). Alternatively, you can use some custom controls: Calendar control, DateTimePicker control, which have the validations already built in.
Rob
[flowerface]
 
Sorry to ask newbie questions. I can not find any infomation about DateTimePicker control is it a file that requires downloading
 
DTPicker is in the collection of Microsoft Windows Common Controls. Establish a reference to this library using (from VBE) tools - references, and checking the name of the library. Then, while editing your userform, right-click on the controls toolbox, choose "additional controls", and select "Microsoft Date and Time Picker". This will put an icon for this control in your toolbox, after which you can drag one onto your userform. The use is fairly straightforward - take a look at the available properties and give it a try!
Rob
[flowerface]
 
Thanks for your time Rob, much appreciated
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top