Currency Format

  • Thread starter Thread starter Always Learning
  • Start date Start date
A

Always Learning

Hi Guys,

Can someone tell me why?

If I set a variable Like so:
MyVar = Format(TotalCost, "###,##0.00")
If the value is 5,241.60 it displays as 5,241.60 but if its 10,483.20 it
displays as 10,483.2 missing the final 0 (zero)

As always, your help is appreciated.

Best Regards,

Steve.
 
Always said:
Hi Guys,

Can someone tell me why?

If I set a variable Like so:
MyVar = Format(TotalCost, "###,##0.00")
If the value is 5,241.60 it displays as 5,241.60 but if its 10,483.20 it
displays as 10,483.2 missing the final 0 (zero)

As always, your help is appreciated.

Best Regards,

Steve.
Wow that is strange
I tried the above and it worked fine for me (no missing zeros)
Perhaps its something to do with where you are putting it.

Also you dont need the first 2 #'s (they make no difference)
"#,##0.00" gives the same results as "###,##0.00"

Could you give a little more detail as to what you are doing with 'MyVar'

George
 
Hi Guys,

Can someone tell me why?

If I set a variable Like so:
MyVar = Format(TotalCost, "###,##0.00")
If the value is 5,241.60 it displays as 5,241.60 but if its 10,483.20 it
displays as 10,483.2 missing the final 0 (zero)

As always, your help is appreciated.

Best Regards,

Steve.
I can see some reasons for this, but:

How are you displaying MyVar?
What Type of variable is MyVar and TotalCost?








--ron
 
Hi Guys,
Thanks for the reply's.

This is the actual bit of code:
ResultsForm.SRWValueCalculated = Format(TotalCost, "###,##0.00")
SRWValueCalculated is a label control on a form.

Thanks for your help.

Best Regards,

Steve.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top