I have a MS Access 2007 database. I have run into an issue (and I\'m sure more will pop up) with some clients in Columbia and Ecuador where their numbering format is different
This should be controlled by the locale settings on the local PC. You can set the decimal separator and number grouping separator, and then Access interacts with 1.000,21 in the same way as 1,000.21 in other locales.
?Format(1000,"currency")
€1.000,00
This is an old question and only asked for ms-access but maybe you may encounter a problem similar to mine. Then you may consider below options, too:
This problem may be related to IIS if you are using Access database for your web pages. Thanks to Dmitriy Pavlov's answer Briefly:
This problem may be related to Visual Studio settings. Thanks to Jim Mischel's answer Briefly:
Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US", false);
Ok, here is what I found:
First of all, I apologize for saying it was a 'type mismatch'. It wasn't. It was an error #2432: "The expression you entered contains invalid syntax, or you need to enclose your text data in quotes". I realize the error was happening on an EVAL() function, which must be done on a string. I was converting the number to a string first, which was treating the "," as a comma instead of a decimal for those with different regional settings for decimals and group separators. In my case the code was:
If Eval(CStr(cCtl.Value) & ">+" & strMinVal = True Then
So I used IAmBatman's suggestion and did a REPLACE() on the field. Since this is just during the field validation process, it's not changing the actual data, like this:
If Eval(CStr(Replace(cCtl.Value),",",".")) & ">+" & strMinVal = True Then
Remou, you were right all along. My humble apologies. :-)
One solution might be to run a replace() on all relevant fields that translate commas into periods if present.