you need to escape all single quotes with another single quote as bar minimum
So
Denis O'Reilly
becomes
Denis O''Reilly
(with two single quotes instead of one single quote).
Use a function that does a replace... e.g.
Function SQLSafe(strText)
SQLSafe = Replace(strText, "'", "''")
End Function
Then you can put SQLsafe(xxx) around whatever values you link into your
SQL query
Failing to sanitize scripts like this is more dangerous than you think. Google for
SQL injection and prepare to cr4p your pants.