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 » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Format Currency field into zero filled text field



 
 
Thread Tools Display Modes
  #1  
Old February 24th, 2010, 08:13 PM posted to microsoft.public.access.queries
marcie
external usenet poster
 
Posts: 27
Default Format Currency field into zero filled text field

I have a field that can be blank or contain a currency amount. No matter
what the value is I want it to be a zero filled field. So for $9.99 I want
0000999 for a blank field i want 0000000 if it is $990.00 I want 0099000. It
seems I can get parts to work.

Format(Salary, "0000000") returns the amount rounded so I lose cents if I
use Format(Salary, "00000.00") i get it to work but have to manually remove
space.

The other problem I am having is having it zero fill when no value
Thanks,
Marcie
  #2  
Old February 24th, 2010, 08:22 PM posted to microsoft.public.access.queries
Duane Hookom
external usenet poster
 
Posts: 7,177
Default Format Currency field into zero filled text field

Try:
Format(Salary * 100, "0000000")

--
Duane Hookom
Microsoft Access MVP


"Marcie" wrote:

I have a field that can be blank or contain a currency amount. No matter
what the value is I want it to be a zero filled field. So for $9.99 I want
0000999 for a blank field i want 0000000 if it is $990.00 I want 0099000. It
seems I can get parts to work.

Format(Salary, "0000000") returns the amount rounded so I lose cents if I
use Format(Salary, "00000.00") i get it to work but have to manually remove
space.

The other problem I am having is having it zero fill when no value
Thanks,
Marcie

 




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


All times are GMT +1. The time now is 03:46 PM.


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