SQL string problem
"Jake Marx" ...
Public Function gsMakeStringSQLSafe(rsSQL As String) As String
gsMakeStringSQLSafe=Replace$(rsSQL, "'", "''")
End Function
Just pass your SQL statement through this function when opening your
recordset
Your function rendered my SQL statement as:
SELECT RefID
FROM PersonalDetails
WHERE Surname = ''Cruise''
which gives the error, "Incorrect syntax near 'Cruise'".
--
|