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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need Date and Time Fields to Auto-fill Upon Update of a Combo Box 1

Status
Not open for further replies.

MattMeat

Programmer
Nov 6, 2001
38
US
Hello Everyone,

I am working on a Service Order Entry Form for our warehouse. I have a combo box called "CompletedBy" and next to it are to disabled text box fields: "Date" and "Time". All I need is for the Date and Time to fill-in the "now" time when a selection is made in the combo box.

Thanks a lot,
Matt
 
first you should change the names of your date and time textboxes to i.e.

txtDate and txtTime

because 'Date' and 'Time' are Access keywords and you'll get into trouble later down the road.

otherwise, in your combo box's OnChange event, put in this code:
Code:
    Me.txtDate = Date
    Me.txtTime = Time()

that's it. you can look up Now() function to in Help. it's Date+Time.

g
 
Thank You so much Ginger!
I was afraid I wasn't going to get a reply.
Keep up the great work!
I'm sure you'll be seeing my name around this forum

Matt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top