Would be grateful if I could be advised on where I have syntax issue(s) with my strSQL string variable below.
Am using rs.Open strSQL ...etc but this is appears to be wrong.
Looking at the various posts on this subject I have noted the 'delimeters' etc but dont seem to have it clear in my head.
To avoid the syntax issues I have tried creating the sql string in the Query Design interface, however when I do this I get the [INSERT],[DELETE],[SELECT],[UPDATE] missing error eg
rs.Open "qryXXXXXX"
Would be grateful for guidance again. Tks in anticipation.
Deemark
Am using rs.Open strSQL ...etc but this is appears to be wrong.
Looking at the various posts on this subject I have noted the 'delimeters' etc but dont seem to have it clear in my head.
To avoid the syntax issues I have tried creating the sql string in the Query Design interface, however when I do this I get the [INSERT],[DELETE],[SELECT],[UPDATE] missing error eg
rs.Open "qryXXXXXX"
Would be grateful for guidance again. Tks in anticipation.
Deemark
Code:
strSQL = "SELECT tblappointments.patientID, tblappointments.paindiagimagepath, tblappointments.appointmentID "
strSQL = strSQL & "FROM tblappointments "
strSQL = strSQL & "WHERE " & (([tblappointments.appointmentID]) = Me.appointmentID) & ""
strSQL = strSQL & " AND " & (([tblappointments.patientID]) = [Forms]![frmpatientsappts]![patientID]) & ""