____________________________________________________ The most important part of your thread is the subject line.
Make it clear and about the topic so we can find it later for reference. Please!! faq333-3811
' To replace ' in sql with ''
Private Function fix(x)
x = "" & x
if x<>"" then
fix = Replace(x, "'", "''"
else
fix = x
end if
End Function
Note: Generally defining a function called fix is not a good idea since tere is already a built-in function called fix. I'm not to sure what effect this will have, but even if it works it will probably hurt efficiency as the system attempts to figure out which fix to use. If it uses scope of declaration to decide than you have lost the use of the built-in fix function since you have redeclard it.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.