A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Number formatting



 
 
Thread Tools Display Modes
  #1  
Old August 30th, 2005, 05:21 PM
AccessNewbie
external usenet poster
 
Posts: n/a
Default Number formatting

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
--
Thanks from a frustrated accountant
  #2  
Old August 30th, 2005, 05:39 PM
Ofer
external usenet poster
 
Posts: n/a
Default

Mybe you can get a better answer, but you can try this

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

"AccessNewbie" wrote:

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
--
Thanks from a frustrated accountant

  #3  
Old August 30th, 2005, 06:56 PM
AccessNewbie
external usenet poster
 
Posts: n/a
Default

Thanks Ofer it works great!!
--
Thanks from a frustrated accountant


"Ofer" wrote:

Mybe you can get a better answer, but you can try this

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

"AccessNewbie" wrote:

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
--
Thanks from a frustrated accountant

  #4  
Old August 30th, 2005, 08:18 PM
Ofer
external usenet poster
 
Posts: n/a
Default

Any time :-)

"AccessNewbie" wrote:

Thanks Ofer it works great!!
--
Thanks from a frustrated accountant


"Ofer" wrote:

Mybe you can get a better answer, but you can try this

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

"AccessNewbie" wrote:

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
--
Thanks from a frustrated accountant

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
thank you Access newsgroup posters Dan General Discussion 3 April 18th, 2005 04:11 PM
Number of objects thomak General Discussion 3 February 17th, 2005 11:58 AM
How do I maintain number formatting in a mail merge? Skittles Mailmerge 1 January 28th, 2005 03:22 AM
Conditional Number Formatting & Selective Summing donkirk General Discussion 0 June 23rd, 2004 06:02 PM
Turning off Auto Number Formatting Lorraine Worksheet Functions 1 February 9th, 2004 10:30 PM


All times are GMT +1. The time now is 09:19 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.