You can do it one of two ways if I understand you correctly.
1,
Use a function like this:
function RemoveQuotes(objval)
if trim(objval) = "" then
RemoveQuotes = "''"
else
objval = replace(objval,"'","''")
objval = replace(objval,"""","''")
RemoveQuotes = "'" & trim(objval) & "'"
end if
end function
and call it like this:
RemoveQuotes(formfieldname)
or simply:
replace(request(formfieldname,"'","''"))