Number formatting

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

First I just want to think all you smart people that help out on this board.
You've saved my life!
Now, here's my problem. The output in my query produces numbers that look
like this for example: 2314.89 or -457.95
I need to get them into this format:
0000231489_ (where the _ represents a "blank")
and 0000045795-
So this field has to be 11 characters long and zero filled at the beginning.
The kicker is that if it is a positive number, I need the 11th (far right)
column to be blank. If it is a negative number, I need a trailing negative
sign in that far right column
 
Mybe you can get a better answer, but you can try this

IIF(MyNum < 0, Format(MyNum * -100, "0000000000") & "-" , format(MyNum *
100, "0000000000") & " ")
 
Back
Top