Hi i have this sql code on frmTransferClinic form and under the command button transfer the code is this
strSQLTransfer = "UPDATE tblPatientClinics SET tblPatientClinics.ClinicDate = txtChooseClinicDate, tblPatientClinics.Consultant = cboConsultant, tblPatientClinics.TransferClinic = chkTransfer, tblPatientClinics.ReasonforCancellation = txtReasonTransfer " & _
"WHERE (((tblPatientClinics.ClinicDate)=[Me]![txtConsultantLst]) AND ((tblPatientClinics.Consultant)=[Me]![txtClinicDatelst]));"
DoCmd.RunSQL strSLQTransfer
but i get an error saying invalid sql statement expected delete, insert, procedure, select and update!
Could u tell me where i have gone wrong!
strSQLTransfer = "UPDATE tblPatientClinics SET tblPatientClinics.ClinicDate = txtChooseClinicDate, tblPatientClinics.Consultant = cboConsultant, tblPatientClinics.TransferClinic = chkTransfer, tblPatientClinics.ReasonforCancellation = txtReasonTransfer " & _
"WHERE (((tblPatientClinics.ClinicDate)=[Me]![txtConsultantLst]) AND ((tblPatientClinics.Consultant)=[Me]![txtClinicDatelst]));"
DoCmd.RunSQL strSLQTransfer
but i get an error saying invalid sql statement expected delete, insert, procedure, select and update!
Could u tell me where i have gone wrong!