Hi,
I have form where one has to input officer's salary along with other data.
The officer's salary field is tied to a currency field in backend Access.
Right now folks enter numbers e.g. 30000.00. However, when someone is writing
30,000.00
a error message comes which shows syntax error. The sql statement via
response.write does not allow me to update the database. However, without the
comma, things are fine. Is there any way to create a error message, which
will not allow one to save the record, if comma is put in the salary value
e.g. 40,000.00?
Any help is appreciated. Thanks.

Re: Hanlding comma in a field in a form which takes currency values by McKirahan

McKirahan
Tue Oct 18 12:33:12 CDT 2005

"Jack" <Jack@discussions.microsoft.com> wrote in message
news:D747F9B9-17A3-4662-9DE4-ABFF9DFFFA39@microsoft.com...
> Hi,
> I have form where one has to input officer's salary along with other data.
> The officer's salary field is tied to a currency field in backend Access.
> Right now folks enter numbers e.g. 30000.00. However, when someone is
writing
> 30,000.00
> a error message comes which shows syntax error. The sql statement via
> response.write does not allow me to update the database. However, without
the
> comma, things are fine. Is there any way to create a error message, which
> will not allow one to save the record, if comma is put in the salary value
> e.g. 40,000.00?
> Any help is appreciated. Thanks.

Can you allow the commas, which is more convenient for users, then
strip it out before updating the database table? For example,
strAMT = Replace(strAMT,",","")




Re: Hanlding comma in a field in a form which takes currency value by Jack

Jack
Tue Oct 18 13:24:04 CDT 2005

Thanks McKirahan for your help. It does work fine now by introducing the
replace statement. With this I can avoid generating error statement as
before. Best regards.

"McKirahan" wrote:

> "Jack" <Jack@discussions.microsoft.com> wrote in message
> news:D747F9B9-17A3-4662-9DE4-ABFF9DFFFA39@microsoft.com...
> > Hi,
> > I have form where one has to input officer's salary along with other data.
> > The officer's salary field is tied to a currency field in backend Access.
> > Right now folks enter numbers e.g. 30000.00. However, when someone is
> writing
> > 30,000.00
> > a error message comes which shows syntax error. The sql statement via
> > response.write does not allow me to update the database. However, without
> the
> > comma, things are fine. Is there any way to create a error message, which
> > will not allow one to save the record, if comma is put in the salary value
> > e.g. 40,000.00?
> > Any help is appreciated. Thanks.
>
> Can you allow the commas, which is more convenient for users, then
> strip it out before updating the database table? For example,
> strAMT = Replace(strAMT,",","")
>
>
>
>