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  

FORMATTING RESULTS IN CALCULATED FIELD



 
 
Thread Tools Display Modes
  #1  
Old November 25th, 2009, 12:54 AM posted to microsoft.public.access.queries
Donna
external usenet poster
 
Posts: 565
Default FORMATTING RESULTS IN CALCULATED FIELD

In design view of a query, I am trying to make a new field by subtracting one
field from another. Since the field to be subtracted is sometimes null, I
used this expression:

DUE: Nz(([SNESFee]-[INVOICE AMOUNT]),[SNESFEE])

The results are correct, but I can't change the way they are formatted. I
want it in currency format. It shows no dollar sign and no decimal places.

I tried to change the format to "currency" in the properties box. No good.
I tried to change the format to $#.00 and that's no good either.

Thanking you in advance for any help.


  #2  
Old November 25th, 2009, 01:31 AM posted to microsoft.public.access.queries
Phil Smith
external usenet poster
 
Posts: 254
Default FORMATTING RESULTS IN CALCULATED FIELD

DUE: FormatCurrency(Nz(([SNESFee]-[INVOICE AMOUNT]),[SNESFEE])).

Look up FormatCurrency() in the help for optoins about decimal places,
leading digits, etc. As Above, it uses your regional settings, which
will probably be all you need.

Phil



donna wrote:
In design view of a query, I am trying to make a new field by subtracting one
field from another. Since the field to be subtracted is sometimes null, I
used this expression:

DUE: Nz(([SNESFee]-[INVOICE AMOUNT]),[SNESFEE])

The results are correct, but I can't change the way they are formatted. I
want it in currency format. It shows no dollar sign and no decimal places.

I tried to change the format to "currency" in the properties box. No good.
I tried to change the format to $#.00 and that's no good either.

Thanking you in advance for any help.


  #3  
Old November 25th, 2009, 06:36 AM posted to microsoft.public.access.queries
Duane Hookom
external usenet poster
 
Posts: 7,177
Default FORMATTING RESULTS IN CALCULATED FIELD

I don't think the query is the place to do any formatting. Can't you apply
formatting in controls on forms and reports? You may need to change your
expression to:
DUE: Val(Nz(([SNESFee]-[INVOICE AMOUNT]),[SNESFEE]))

--
Duane Hookom
Microsoft Access MVP


"Phil Smith" wrote:

DUE: FormatCurrency(Nz(([SNESFee]-[INVOICE AMOUNT]),[SNESFEE])).

Look up FormatCurrency() in the help for optoins about decimal places,
leading digits, etc. As Above, it uses your regional settings, which
will probably be all you need.

Phil



donna wrote:
In design view of a query, I am trying to make a new field by subtracting one
field from another. Since the field to be subtracted is sometimes null, I
used this expression:

DUE: Nz(([SNESFee]-[INVOICE AMOUNT]),[SNESFEE])

The results are correct, but I can't change the way they are formatted. I
want it in currency format. It shows no dollar sign and no decimal places.

I tried to change the format to "currency" in the properties box. No good.
I tried to change the format to $#.00 and that's no good either.

Thanking you in advance for any help.


.

  #4  
Old November 25th, 2009, 05:28 PM posted to microsoft.public.access.queries
Marshall Barton
external usenet poster
 
Posts: 5,361
Default FORMATTING RESULTS IN CALCULATED FIELD

donna wrote:

In design view of a query, I am trying to make a new field by subtracting one
field from another. Since the field to be subtracted is sometimes null, I
used this expression:

DUE: Nz(([SNESFee]-[INVOICE AMOUNT]),[SNESFEE])

The results are correct, but I can't change the way they are formatted. I
want it in currency format. It shows no dollar sign and no decimal places.

I tried to change the format to "currency" in the properties box. No good.
I tried to change the format to $#.00 and that's no good either.



That would happen if the result of the expression is somehow
being converted to a text string??

Your expression feels awkward to me. Try using:

Due: SNESFee - Nz(INVOICE AMOUNT], 0)

I don't see how that would make a difference, so, if it
still won't format try converting it back to a number.

Due: CCur(SNESFee - Nz(INVOICE AMOUNT], 0))

--
Marsh
MVP [MS Access]
  #5  
Old November 25th, 2009, 09:39 PM posted to microsoft.public.access.queries
Donna
external usenet poster
 
Posts: 565
Default FORMATTING RESULTS IN CALCULATED FIELD

Aaaah!!!!! Thank you!!!

"Duane Hookom" wrote:

I don't think the query is the place to do any formatting. Can't you apply
formatting in controls on forms and reports? You may need to change your
expression to:
DUE: Val(Nz(([SNESFee]-[INVOICE AMOUNT]),[SNESFEE]))

--
Duane Hookom
Microsoft Access MVP


"Phil Smith" wrote:

DUE: FormatCurrency(Nz(([SNESFee]-[INVOICE AMOUNT]),[SNESFEE])).

Look up FormatCurrency() in the help for optoins about decimal places,
leading digits, etc. As Above, it uses your regional settings, which
will probably be all you need.

Phil



donna wrote:
In design view of a query, I am trying to make a new field by subtracting one
field from another. Since the field to be subtracted is sometimes null, I
used this expression:

DUE: Nz(([SNESFee]-[INVOICE AMOUNT]),[SNESFEE])

The results are correct, but I can't change the way they are formatted. I
want it in currency format. It shows no dollar sign and no decimal places.

I tried to change the format to "currency" in the properties box. No good.
I tried to change the format to $#.00 and that's no good either.

Thanking you in advance for any help.


.

 




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 06:03 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.