Solved Format a numeric field with a comma and no decimal point (1 Viewer)

access2010

Registered User.
Local time
Today, 00:01
Joined
Dec 26, 2009
Messages
1,021
Could I please receive a suggestion on how to format a number with a comma for thousands and having no decimal?

10000 should be displayed as 10,000 (never with any decimal place)

We are using MsAccess 2003.

Thank you.
Crystal
 

CJ_London

Super Moderator
Staff member
Local time
Today, 08:01
Joined
Feb 19, 2013
Messages
16,610
use the format property for the control. for no decimal places use #,##0
 

Ranman256

Well-known member
Local time
Today, 03:01
Joined
Apr 9, 2015
Messages
4,337
format STANDARD,
decimals = 0
for field, or textbox
 

access2010

Registered User.
Local time
Today, 00:01
Joined
Dec 26, 2009
Messages
1,021
use the format property for the control. for no decimal places use #,##0
Thank you for pointing me in the right direction, to control the formatting on the form and not at the table.

Crystal
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 03:01
Joined
Feb 19, 2002
Messages
43,266
NEVER format data in a table. Users never look at tables. Only the programmer looks a tables and the programmer needs to know EXACTLY what value the field contains. For example, if you have a double precision number and it is 123.49 but you format it to have 0 decimal places, when you open the table and view the data, the value will be 123 but if you were to use criteria in a query to search for 123, you would not find this record.

All formatting belongs in forms and reports. Formatting is for human consumption. You might occasionally have to format in a query if you are exporting the data to Excel or some other app to suit their needs.
 

access2010

Registered User.
Local time
Today, 00:01
Joined
Dec 26, 2009
Messages
1,021
Thank you Pat Hartman.
I have made a note of your suggestion to be used in our future forms.
Thank you.
Crystal
 

Users who are viewing this thread

Top Bottom