A
Al
the following sql is giving me an error message:Run-time error '3075': Syntax
error in string in query expression'" AS Concentration FROM tblVitalSigns
WHERE [PatientID]='004444".
****************************************
vsql_app = "INSERT INTO DRpt_VitalsRawData ( PhysicalExamID, PatientID,
MedicationType, DateofExam, MedicationVol, " & _
"MedicationFrequency, BodyWt, Discontinued, Concentration ) " & _
"SELECT PhysicalExamID, PatientID, "" AS MedicationType, DateofExam, "" AS
MedicationVol, "" AS MedicationFrequency, " & _
"BodyWt, "" AS Discontinued, "" AS Concentration " & _
"FROM tblVitalSigns WHERE [PatientID] ='" & Me![txtPatientID] & "'"
db.Execute vsql_app, dbFailOnError
****************************************
I am running the above sql from a form, when a button is clicked. If I run
this, straight from a query, it works. the sql behind the query looks like
this:
********************
INSERT INTO DRpt_VitalsRawData ( PhysicalExamID, PatientID, MedicationType,
DateofExam, MedicationVol, MedicationFrequency, BodyWt, Discontinued,
Concentration )
SELECT tblVitalSigns.PhysicalExamID, tblVitalSigns.PatientID, "" AS
MedicationType, tblVitalSigns.DateofExam, "" AS MedicationVol, "" AS
MedicationFrequency, tblVitalSigns.BodyWt, "" AS Discontinued, "" AS
Concentration
FROM tblVitalSigns
WHERE (((tblVitalSigns.PatientID)="004444"))
************************************
any idea, what am I doing wrong?
thanks
Al
error in string in query expression'" AS Concentration FROM tblVitalSigns
WHERE [PatientID]='004444".
****************************************
vsql_app = "INSERT INTO DRpt_VitalsRawData ( PhysicalExamID, PatientID,
MedicationType, DateofExam, MedicationVol, " & _
"MedicationFrequency, BodyWt, Discontinued, Concentration ) " & _
"SELECT PhysicalExamID, PatientID, "" AS MedicationType, DateofExam, "" AS
MedicationVol, "" AS MedicationFrequency, " & _
"BodyWt, "" AS Discontinued, "" AS Concentration " & _
"FROM tblVitalSigns WHERE [PatientID] ='" & Me![txtPatientID] & "'"
db.Execute vsql_app, dbFailOnError
****************************************
I am running the above sql from a form, when a button is clicked. If I run
this, straight from a query, it works. the sql behind the query looks like
this:
********************
INSERT INTO DRpt_VitalsRawData ( PhysicalExamID, PatientID, MedicationType,
DateofExam, MedicationVol, MedicationFrequency, BodyWt, Discontinued,
Concentration )
SELECT tblVitalSigns.PhysicalExamID, tblVitalSigns.PatientID, "" AS
MedicationType, tblVitalSigns.DateofExam, "" AS MedicationVol, "" AS
MedicationFrequency, tblVitalSigns.BodyWt, "" AS Discontinued, "" AS
Concentration
FROM tblVitalSigns
WHERE (((tblVitalSigns.PatientID)="004444"))
************************************
any idea, what am I doing wrong?
thanks
Al