angie_angie
asked on
How to output a number in standard format while the number is varying in value
I want to write some code like this:
sSQL = "SELECT Format([OrderValue],'0,000 .00') As Expr1 FROM..."
then open a recordset to write this value into a Word document.
The problem here is the value of OrderValue changes everytime.
If OrderValue = 500, in Word doc it will be 0,500.00 (extra 0 and comma)
If OrderValue = 4000000, in Word doc it will be 4000,000.00 (lack of one comma)
How to solve such problem?
sSQL = "SELECT Format([OrderValue],'0,000
then open a recordset to write this value into a Word document.
The problem here is the value of OrderValue changes everytime.
If OrderValue = 500, in Word doc it will be 0,500.00 (extra 0 and comma)
If OrderValue = 4000000, in Word doc it will be 4000,000.00 (lack of one comma)
How to solve such problem?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
<open a recordset to write this value into a Word document>
If you just need to insert this value into a Word Document you can just store it as a Variable and insert it into the text.
Please explain why it must be in a recorrdset to be inserted into a Word Document?
JeffCoachman