Appending time to an input date

Bill Moore

Registered User.
Local time
Today, 20:28
Joined
Dec 11, 2003
Messages
51
I need to have the user enter a date on a form and would like to immediately append a time part "23:59:59" to that date. I can do it when using two text boxes (txt1, txt2) by changing the control source of txt2 to:

=txt1 + time("23:59:59").

I'd like to use only 1 text box (txt1).

Thanks in advance.

Bill.
 
First of all, make sure the TextBox Format is set to General Date

then

Private Sub TextBox_AfterUpdate()
TextBox.Value = TextBox.Value + Time()
End Sub
 

Users who are viewing this thread

Back
Top Bottom