ClulessChris
IS-IT--Management
I use the following statement it insert into an Access database:
However should one of the fields I try to insert contain an apostrophe (e.g. O'Neil) the statement crashes. Please help.
Everybody body is somebodys Nutter.
Code:
g_sSQL = "INSERT INTO tblRequests (sSurname, sInitials,sNino,bFromCCC, sRequested" & _
",sAddress, sDetails, sFrom, dSent,dImported)" & _
"VALUES('" & Field_Arr(0) & "','" & Field_Arr(1) & "','" & Field_Arr(2) & "'" & _
",'" & Field_Arr(3) & "','" & Field_Arr(4) & "','" & Field_Arr(5) & "','" & Field_Arr(6) & "'" & _
",'" & Field_Arr(7) & "','" & Field_Arr(8) & "','" & Now & "')"
dbFormRequests.Execute g_sSQL
However should one of the fields I try to insert contain an apostrophe (e.g. O'Neil) the statement crashes. Please help.
Everybody body is somebodys Nutter.