Apostraphe Problem

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi All,

I'm having problems when my users enter data with an apostraphe, i use a lot
of un bound forms so input alot of data using code. When a user inputs for
example "David O'Keith" they get an error, when the form attempts to save the
record.

So far i have only found functions to strip the apostraphe, this is not
preferable.

Any ideas.

TIA

Rico
 
What is the error?

What type of field is this being saved in?

Is there any code running that might affect this?
 
Hi All,

I'm having problems when my users enter data with an apostraphe, i use a lot
of un bound forms so input alot of data using code. When a user inputs for
example "David O'Keith" they get an error, when the form attempts to save the
record.

So far i have only found functions to strip the apostraphe, this is not
preferable.

Any ideas.

TIA

Rico

You need to check the user's input for apostrophes, and replace each
single with two apostrophes:
Input: "David O'Keith"
Escaped apostrophe: "David O''Keith"

Thats two apostrophes between O and K, not a double-quote

Cheers
 
Why would you need to do that? I just went into one of my databases and
entered a name with an apostrophe and it worked just fine. I think the
submitter is saying that the users are simply entering a record from a form
and they are getting an error if the entry contains an apostrophe.
 
Why would you need to do that? I just went into one of my databases and
entered a name with an apostrophe and it worked just fine. I think the
submitter is saying that the users are simply entering a record from a form
and they are getting an error if the entry contains an apostrophe.

The OP mentioned the forms are unbound so I am guessing he is
manipulating the data somehow and then updating his DB
If he is building the insert DML and the quotes are not properly
escaped he will get errors

Cheers
 
ahhhh. Good point.

:-)


--
Rick B



ChrisHulan said:
The OP mentioned the forms are unbound so I am guessing he is
manipulating the data somehow and then updating his DB
If he is building the insert DML and the quotes are not properly
escaped he will get errors

Cheers
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top