PC Review


Reply
Thread Tools Rate Thread

Comma used as decimal causing issues with parameter list

 
 
=?Utf-8?B?Q2FsbGFu?=
Guest
Posts: n/a
 
      19th Apr 2006
The program is using the regional settings for Brazil. Using these regional
setting. the currency is as such: R $ 100,00.
they use a comma instead of a full stop to denote decimals.
This now causes an issue when sent as a parameter value as Access does not
see it as a "whole" parameter, but instead sees the comma as a list seperator.

Therefore all functions using currency are failing due to there being "too
many" parameters.

Please, any help on the matter would be greatly appreciated

Thanks in advance.
--
Callan
 
Reply With Quote
 
 
 
 
Alex Dybenko
Guest
Posts: n/a
 
      19th Apr 2006
Hi,
for currencies you have to change decimals to dot before assigning to
parameter, this should work. you can use replace function

Also you can declare parameter and assign it a currency variable type

--
Best regards,
___________
Alex Dybenko (MVP)
http://alexdyb.blogspot.com
http://www.PointLtd.com

"Callan" <(E-Mail Removed)> wrote in message
news:0F7DAB41-A6B5-4D80-8A2E-(E-Mail Removed)...
> The program is using the regional settings for Brazil. Using these
> regional
> setting. the currency is as such: R $ 100,00.
> they use a comma instead of a full stop to denote decimals.
> This now causes an issue when sent as a parameter value as Access does not
> see it as a "whole" parameter, but instead sees the comma as a list
> seperator.
>
> Therefore all functions using currency are failing due to there being "too
> many" parameters.
>
> Please, any help on the matter would be greatly appreciated
>
> Thanks in advance.
> --
> Callan


 
Reply With Quote
 
=?Utf-8?B?Q2FsbGFu?=
Guest
Posts: n/a
 
      20th Apr 2006
Hi Alex,

Thanks, but I've had to write a seperate function to programmatically change
the comma in the parameter to a decimal.

It doesn't help if you change the decimal to a dot. The regional settings
overide the change and keep it as a comma. This is the same when declaring
the variable as currency. even if you change the decimal point in "Regional
Settings" in windows.

If anyone else has a better way of solving this other than the way I have
done it, this would be great to know.

Thanks again.
--
Callan


"Alex Dybenko" wrote:

> Hi,
> for currencies you have to change decimals to dot before assigning to
> parameter, this should work. you can use replace function
>
> Also you can declare parameter and assign it a currency variable type
>
> --
> Best regards,
> ___________
> Alex Dybenko (MVP)
> http://alexdyb.blogspot.com
> http://www.PointLtd.com
>
> "Callan" <(E-Mail Removed)> wrote in message
> news:0F7DAB41-A6B5-4D80-8A2E-(E-Mail Removed)...
> > The program is using the regional settings for Brazil. Using these
> > regional
> > setting. the currency is as such: R $ 100,00.
> > they use a comma instead of a full stop to denote decimals.
> > This now causes an issue when sent as a parameter value as Access does not
> > see it as a "whole" parameter, but instead sees the comma as a list
> > seperator.
> >
> > Therefore all functions using currency are failing due to there being "too
> > many" parameters.
> >
> > Please, any help on the matter would be greatly appreciated
> >
> > Thanks in advance.
> > --
> > Callan

>
>

 
Reply With Quote
 
Alex Dybenko
Guest
Posts: n/a
 
      20th Apr 2006
Well, what I mean is the following - say you have to run a query and pass
currency variable to it - then I do the following:

strSQL= "Update MyTable Set Price=" & replace(curPrice & "",",",".")

this will result:
strSQL= "Update MyTable Set Price=123.44"

and perfectly understandable by jet. in Russia we also have comma as decimal

perhaps you can post your code here, so we have better idea of what you are
doing

--
Best regards,
___________
Alex Dybenko (MVP)
http://alexdyb.blogspot.com
http://www.PointLtd.com


"Callan" <(E-Mail Removed)> wrote in message
news:ADF5F63E-1EB5-483D-8198-(E-Mail Removed)...
> Hi Alex,
>
> Thanks, but I've had to write a seperate function to programmatically
> change
> the comma in the parameter to a decimal.
>
> It doesn't help if you change the decimal to a dot. The regional settings
> overide the change and keep it as a comma. This is the same when declaring
> the variable as currency. even if you change the decimal point in
> "Regional
> Settings" in windows.
>
> If anyone else has a better way of solving this other than the way I have
> done it, this would be great to know.
>
> Thanks again.
> --
> Callan
>
>
> "Alex Dybenko" wrote:
>


>> Hi,
>> for currencies you have to change decimals to dot before assigning to
>> parameter, this should work. you can use replace function
>>
>> Also you can declare parameter and assign it a currency variable type
>>
>> --
>> Best regards,
>> ___________
>> Alex Dybenko (MVP)
>> http://alexdyb.blogspot.com
>> http://www.PointLtd.com
>>
>> "Callan" <(E-Mail Removed)> wrote in message
>> news:0F7DAB41-A6B5-4D80-8A2E-(E-Mail Removed)...
>> > The program is using the regional settings for Brazil. Using these
>> > regional
>> > setting. the currency is as such: R $ 100,00.
>> > they use a comma instead of a full stop to denote decimals.
>> > This now causes an issue when sent as a parameter value as Access does
>> > not
>> > see it as a "whole" parameter, but instead sees the comma as a list
>> > seperator.
>> >
>> > Therefore all functions using currency are failing due to there being
>> > "too
>> > many" parameters.
>> >
>> > Please, any help on the matter would be greatly appreciated
>> >
>> > Thanks in advance.
>> > --
>> > Callan

>>
>>


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Batch converting CSV files from comma-decimal to period-decimal Nodles Microsoft Excel Misc 3 5th Jul 2006 06:57 PM
How to convert Decimal number with comma(,) as decimal separator to dot(.) Domac Microsoft Access 5 10th May 2006 02:12 PM
How to convert Decimal number with comma(,) as decimal separator to dot(.) Domac Microsoft Access 1 10th May 2006 01:04 PM
How to convert Decimal number with comma(,) as decimal separator to dot(.) Domac Microsoft Access Forms 1 10th May 2006 01:04 PM
How to convert Decimal number with comma(,) as decimal separator to dot(.) Domac Microsoft Access Reports 1 10th May 2006 01:04 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:42 PM.