On Mar 23, 11:57 am, "Rick B" <Anonymous> wrote:
> 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.
>
> --
> Rick B
>
> "ChrisHulan" <chris.hu...@gmail.com> wrote in message
>
> news:(E-Mail Removed)...
>
> > On Mar 23, 10:12 am, rico <r...@discussions.microsoft.com> wrote:
> >> 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
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
|