setting a time default

C

Colin Richards

How do i set a preselected time of 3am in to a text feild?

I have tried txtStartTime.text=DateAdd("h",3) but this increments the
current time by three hours, so im thinking i may be using the wrong comand.

How do i make time equal 03:00:00?
 
O

Ofer

Open the form in design view, set the default value of the field in the form
to "03:00:00"
Or you can set the default of the field in the table, to the same default
 
C

Colin Richards

ok, i should have been a little more specific, but i also wish to add a
series of push buttons to change the time to another preset value.. How can
it be done in VB?
 
O

Ofer

Try this
Me.txtStartTime="03:00:00"

Or, to add time to exisiting field
Me.txtStartTime=DateAdd("h",3,TimeField)
 
Top