change txtbox format to hh:mm:ss

banks

Well-known member
Joined
Sep 7, 2005
Messages
50
Programming Experience
Beginner
Hi, i need to change a normal textbox to a hh:mm:ss time format so that a time is entered correctly. Have got an access table behind the scenes...

I have tried this but it doesn't do a lot!

txtTimeLost.Text.Format("hh:mm:ss")

Any help/ideas much apreciated,

Al
 
Not really, it's just a textbox. i take everything from each textbox on my form and submit a query, i dont bind each column to a field on my form
 
You can't force a format in a regular TextBox. You can use the Microsoft ActiveX MaskedEdit control, but the sensible thing to do would be to use a DateTimePicker.
 
yeah thats what i went with in the end

dtpTimeLost.ShowUpDown = True

dtpTimeLost.Format = DateTimePickerFormat.Custom

dtpTimeLost.CustomFormat = "hh:mm:ss"
 
Back
Top