Return Number In Calculated Field as Currency

J

joshbell

Hello,


I am trying to trun some numbers into currency using a calculated value

in a query. Although the result formats the results as currency, it
sorts as a string would. Here is my statement:


Penalty:
IIf([datClaimPaidDate]-[datClaimLtrDate]>30,FormatCurrency(([datClaimPaidDa­te]-[datClaimLtrDate]-30)*50),"")



Does anyone have any suggestions on how to get this to return as actual

currency that will sort like currency?


Thank you for your help!


jb
 
D

Duane Hookom

Don't create an IIf() calculation that might return a number of might return
a string.
Penalty:
Val(IIf([datClaimPaidDate]-[datClaimLtrDate]>30,([datClaimPaidDa­te]-[datClaimLtrDate]-30)*50,0)
You can apply a format in a control on your form or report.
--
Duane Hookom
MS Access MVP
--

Hello,


I am trying to trun some numbers into currency using a calculated value

in a query. Although the result formats the results as currency, it
sorts as a string would. Here is my statement:


Penalty:
IIf([datClaimPaidDate]-[datClaimLtrDate]>30,FormatCurrency(([datClaimPaidDa­te]-[datClaimLtrDate]-30)*50),"")



Does anyone have any suggestions on how to get this to return as actual

currency that will sort like currency?


Thank you for your help!


jb
 

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