Try something like the code below in afterupdate of the textbox:
TextBox1.Value = Format(TextBox1.Value, "HH:MM:SS")
You'll probably want to initialize it in the form.activate:
TextBox1.Value = Format(Now, "HH:MM:SS")
NOTE: This doesn't do validation so invalid values, such as non-numeric characters, can still be entered into the textbox. I'd suggest checking the value and displaying a message if the data entered into the field is incorrect.
|