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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|