Format numerics inside text control.

jdfuller
jdfuller used Ask the Experts™
on
I have a numeric variable inside a text control that I want formated as a standard number.  The text control data source looks like this ...  ="as a minimum and "& [VarNum1] & " as a maximum."  I tried formatting the entire control as Standard, 0 decimal places but to no avail.  When the number get over one thousand I want to see commas.  Is there a format command that works "in-line" like an immediate "if" to solve this problem?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Commented:
="as a minimum and "& Format([VarNum1], "#,###.00") & " as a maximum."
Commented:
oops ... 0 decimals
="as a minimum and "& Format([VarNum1], "#,###") & " as a maximum."

Author

Commented:
I have just tried (Format([VarNum1], "Standard")) and got 1,000 !! Great but don't need decimal.  Format([VarNum1], "#,###") works.  Will this treat millions properly? - YES!!  Thanks Steve.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial