Aperstrof i feltet
HejJeg bruger følgende SQL til at indsætte poster i min tabel:
strSQL = "INSERT INTO placering"
strSQL = strSQL & "([show], [day], [show_nbr], [placering], [class], [gender], [type], [kontrolfelt], [dog_id], [txt1], [txt2], [txt3], [txt4], [txt5], [txt6], [txt7], [txt8])"
strSQL = strSQL & "VALUES( " & [strShow] & _
"," & [strDay] & _
"," & [strShownbr] & _
"," & [strPlacering] & _
"," & [strClass] & _
"," & [strGender] & _
"," & [strType] & _
",'" & [strKontrolfelt] & _
"'," & [strDogID] & _
",'" & [Text1] & _
"','" & [Text2] & _
"','" & ([Text3]) & _
"','" & [Text4] & _
"','" & [Text5] & _
"','" & [Text6] & _
"','" & [Text7] & _
"','" & [Text8] & "');"
DoCmd.RunSQL strSQL
Problemet er at nogle af felterne indeholder Apostrof ' eller "
Kan man ikke få SQL til at ignorere disse?
