FORMATTING RESULTS IN CALCULATED FIELD

D

donna

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.
 
P

Phil Smith

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
 
D

Duane Hookom

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 said:
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


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.
.
 
M

Marshall Barton

donna said:
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))
 
D

donna

Aaaah!!!!! Thank you!!!

Duane Hookom said:
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 said:
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


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.
.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top