Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

handling special characters

Status
Not open for further replies.

davikokar

Technical User
May 13, 2004
523
IT
hallo,
in some sub of my database I use sql code that refers to fields in a form. Everything works fine if in the field there is "normal" data, but as soon as there is a quotation mark or other special characters the query, obviously, won't work anymore... Do you know if there is a workaround to this problem?

thanks
 
If ac2k or above:
strSQL = "... [tt]'" & Replace(Forms!FormName!Control, "'", "''") & "'[/tt] ..."

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top