query field format

C

Cyndi

I have a field in a query(that outputs to a report)

StudFeeDue:IIf([FinalStatus]="In-Foal],[Expr2],"0")
This works like a charm to return the values I want but will not let
me format it as Currency - all the fields in draws on are formatted
currency but it wont let me do it and if I go to the report and try
formatting the field there it still wont work.
Thanks
 
A

Allen Browne

Drop the quote marks around the zero. They tell Access to interpret the
value as a string instead of a number:
StudFeeDue:IIf([FinalStatus]="In-Foal", [Expr2], 0)

To be more explicit, you could use:
StudFeeDue:CCur(IIf([FinalStatus]="In-Foal", Nz([Expr2],0), 0))
Explanation in article:
Calculated fields misinterpreted
at:
http://allenbrowne.com/ser-45.html
 

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