I've the following SQL and update.
sAppt = "UPDATE tblTAppt SET ApptStart=#txtApptStart#, ApptEnd=#txtApptEnd#, Completed=chkCompleted, " & _
" AppointedBy=txtApptedBy, RankCode=fraHSR, JobPosition=txtJobPosition, Dept=sDept, Company=sCompany, " & _
" Honorarium=sHon, Allowance=sAll, FCF_No=sFCF_No, Budget=iBudget, DaysNotAvailable=sDaysNotAvailable, Remark=sRemark " & _
" WHERE tblTAppt.TRef = iID and iTApptID = txtTApptID"
CurrentDb.Execute sAppt
It runs into run-time error "3075", Syntax error in date in query expression '#txtApptStart'.
It is weird that it's "#txtApptStart#" but came out as "#txtApptStart".
Note: txtApptStart is format as "Medium Date".
I would be appreciated if you have any suggestions on this problem
sAppt = "UPDATE tblTAppt SET ApptStart=#txtApptStart#, ApptEnd=#txtApptEnd#, Completed=chkCompleted, " & _
" AppointedBy=txtApptedBy, RankCode=fraHSR, JobPosition=txtJobPosition, Dept=sDept, Company=sCompany, " & _
" Honorarium=sHon, Allowance=sAll, FCF_No=sFCF_No, Budget=iBudget, DaysNotAvailable=sDaysNotAvailable, Remark=sRemark " & _
" WHERE tblTAppt.TRef = iID and iTApptID = txtTApptID"
CurrentDb.Execute sAppt
It runs into run-time error "3075", Syntax error in date in query expression '#txtApptStart'.
It is weird that it's "#txtApptStart#" but came out as "#txtApptStart".
Note: txtApptStart is format as "Medium Date".
I would be appreciated if you have any suggestions on this problem