Currency and Standard formatting

  • Thread starter Thread starter Mercer
  • Start date Start date
M

Mercer

Help: I wrote code to calculate a Year To Date (YTD)
number. I get the correct result but I am unable to format
that into a currency. I use the same for YTD standard
values that I cannot format. Here's the code I used:

YTDIDEAAwarded: IIf(IsNull([PriorMonth]),Null,DSum
("[IDEATotalAwarded]","[SuggestionsTbl]","[SuggestionsMonth
]>=#1/1/" & Year([SuggestionsMonth]) & "# AND
[SuggestionsMonth]<=#" & [SuggestionsMonth] & "#"))

Can this be formatted as Currency and Standard format?
Those options are not available.

Any suggestions are appreciated. This is my first Posting
and I'm looking forward to responses. Thank you!
 
It is usually more important to ensure that Access understands the intended
date type of a calculated field than to get it to display correctly.
Generally you will use the query as the input to a form or report, and you
can then use the Format property of the text box to control how it is
displayed.

Use CVDate() around a calculated query field to force Access to recognise it
as a date field, or CCur() to force it to recognise it as Currency.

More information in article:
Calculated fields misinterpreted
at:
http://allenbrowne.com/ser-45.html
 
Back
Top