Solved

Setting Decimal and Thousand Character in my App

Posted on 2001-06-19
4
268 Views
Last Modified: 2010-05-02
Hi folks,
i want to have only one output for numbers in my application. The Settings which are coming from the control panel for these characters should be ignored.

I can read it with GetLocaleInfo, but I can't set it with SetLocaleInfo. But when i format a number these changes have no effect. The number is displayed the same way.
Does anybody know how to change the current characters for the decimal and thousand character.

olka
0
Comment
Question by:olka
4 Comments
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 6205771
Yes, simply "escape" the format:

FORMAT(100.4, " #0\,000") will produce this output:
100,400
independant of the regional settings. The backslash will make the , to be forced, and not interpreted using the regional settings

Cheers
0
 

Author Comment

by:olka
ID: 6205797
thank you,
but now i have the problem with great number
try:
format(23412956.67, "#\.##0\,00")  => output is 234.129,57

but i want 23.412.956,67
0
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 50 total points
ID: 6206243
0
 
LVL 6

Expert Comment

by:andyclap
ID: 6207898
It's a bit of a pain that you can't escape a decimal point and still get the format function to understand it as a d.p.
You're best off writing your own little routine to do this - having the added advantage of providing a single point to change if you need to extend it to do different formats.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question