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

Date and time picker control 6.0 (SP4)

Status
Not open for further replies.

jaydeebe

IS-IT--Management
Nov 14, 2003
169
0
0
GB
How might I get the user to input the date and time easily. I have tried having seperate controls for time and date but can't combine the values to save in one date/time field -

DoCmd.RunSQL "INSERT INTO tblbookings ([StartDate],_[EndDate],[UserID],[ResID],[FileLocation]) VALUES _(txtStartDate & ' '& txtStartTime,txtEndDate & ' ' &_ txtendTime, txtUserID ,cboAvailRes, txtFileLoc);"

gives error due to type conversion error.

I have tried custom format for the DT picker of dd/MM/yyyy hh:mm but this is not a friendly way of inputing.

Any ideas anyone?
 
Something like this ?
DoCmd.RunSQL "INSERT INTO tblbookings ([StartDate],_[EndDate],[UserID],[ResID],[FileLocation]) VALUES (#" _
& txtStartDate & "#+#" & txtStartTime & "#,#" & txtEndDate & "#+#" & txtendTime & "#," _
& txtUserID & "," & cboAvailRes & ",'" & txtFileLoc & "')"

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top