|
Subject:
|
ADO
|
|
Posted By:
|
setyna
|
Post Date:
|
11/11/2004 1:01:11 PM
|
I have a form in access where users submit there entries. There is one text(memo)field on the form. Whenever users use any types of apostrophes they receive an error. Is there a work around for this? see example below.
dim strtxtComments as string dim db as databse set db=currentdb
strtxtComments ="This is a test's"
strsql1 = "INSERT INTO tbl_Main_Quality (Comments)" & _ "select" & "'" & strtxtComments & "'" db.Execute (strsql1)
|
|
Reply By:
|
happygv
|
Reply Date:
|
11/15/2004 12:58:26 AM
|
Use Replace() vbscript function to replace all single quotes with double SINGLE QUOTES there.
That should solve this. Cheers!
_________________________ - Vijay G Strive for Perfection
|