Function formatFormText(sText) sText = "" & sText 'should handle null values now sText = Replace(sText, "'", "''") formatFormText = sText End Function strFirst = FormatFormText(Request.Form("name")) strEmail = FormatFormText(Request.Form("email"))
eoin_s wrote: Hi, I know this is totally OT and you have probably done this anyway, but remember to escape single quotes - especially when you are dealing with name fields, and even more especially when you are dealing with Irish names! regards, Eoin