Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

can't get fixed amount

Status
Not open for further replies.

aquinox

Programmer
Jul 2, 2007
38
AU
Hi,

I was wondering if i could get some help here. In my query, i have the following field which is the result of a calculation as follows

IIf([EductionOK]="Not OK",Format(60000+700*(((1.1*[WindTime])-[NewTimeToSpill])*[GHD PDWF]),"Fixed"),"") AS InstantESize.

My objective is to be able to get a number that has no decimal point. The above results in 2 decimal points e.g. 3045.89. what we'd like to see is just 3046. Nothing i can tweak it to give me just a fixed amount except thru the code but this doesn't give the right answer we wanted it to.

Is there any way of resolving this?

Thank you in advance
 
Replace "Fixed" with "0"

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
It looks like you want to return a numeric value if the expression is true. If so, you should return either Null or 0 rather than "" for the false part.

I would try something like:
IIf([EductionOK]="Not OK",CInt(60000+700*(((1.1*[WindTime])-[NewTimeToSpill])*[GHD PDWF])),Null) AS InstantESize



Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top