Avatar of developingprogrammer
developingprogrammer asked on

formatting number for thousands' comma #,###,###,###

hey guys!

i'm curious. if i have 2 numbers

9999
9999999999

and i want to insert commas in the thousands position to make it more readable so it'll look like this

9,999
9,999,999,999

i know i can do Format(strEndingBalance, "#,###,###,###.00")

and apply it to both numbers.

however what if i have another number

9999999999999999999999999999999999999999999999999999999999

(ok just ignore that no variable can store that hahaha - i think!! hrmm, can any variable store that number? i feel like Ali G asking the scientists about computers if they can multiply 999999999999991099910101010999 x 9999101099998910101010!! hahaha http://www.youtube.com/watch?v=eB5VXJXxnNU)

is there a format that i can use that will apply the comma at even interval recursively or must i type out a very very very long format string like the following?



Format(strEndingBalance, "#,###,###,###,###,###,###,###,###,###,###,###,###,###,###,###,###,###,###,###,###,###,###,###,###,###,###,###,###,###,###,###,###,###,###,###,###,###,###,###,###,###,###,###,###,###,###,###,###,###,###,###,###,###,###,###,###,###,###,###,###,###,###,###,###,###,###.00")?

haha k that's REALLY LONG!!

is there anyway i can type out Format(strEndingBalance, "#,###") and make it recursive? thanks guys!! = ))
Microsoft Access

Avatar of undefined
Last Comment
developingprogrammer

8/22/2022 - Mon
SOLUTION
Bill Ross

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
ASKER CERTIFIED SOLUTION
als315

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
SOLUTION
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
ASKER
developingprogrammer

whao guys, fantastic!! i didn't know about "Standard", i didn't know that #,### would repeat and definitely didn't know about the esoteric function FormatNumber!! haha great!! = )

in the end i decided to use

Format(CCur(varEndingBalance), """Credit:"" #,###.00;""Debit:"" #,###.00")

because that gave more control over the prefixes.

but thanks guys for all your help, appreciate it!! = ))
Your help has saved me hundreds of hours of internet surfing.
fblack61