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!

Help! with Expression!

Status
Not open for further replies.

RookieDBO

Technical User
Sep 20, 2001
83
CA
Would someone please help me take off the decimal of my expression result. I tried adding "Int" but could not get it to work. I've got a text to display if it's being divided by zero else go ahead with the calculation. However the results are showing with decimal. Don't want that.


Week OH: IIf([x14-Pure Outstanding List with Last Week Invn & Fcst]![SumOfSumOfCURR_FCST_QTY]=0,"#DIV/0!",IIf([x14-Pure Outstanding List with Last Week Invn & Fcst]![This Week Invn]>[x14-Pure Outstanding List with Last Week Invn & Fcst]![SumOfSumOfCURR_FCST_QTY],[x14-Pure Outstanding List with Last Week Invn & Fcst]![This Week Invn]/[x14-Pure Outstanding List with Last Week Invn & Fcst]![SumOfSumOfCURR_FCST_QTY],0))


Thanks,
RookieDBO
 
Where did you try the "Int" function?

It should probably look like this:

Week OH: IIf([x14-Pure Outstanding List with Last Week Invn & Fcst]![SumOfSumOfCURR_FCST_QTY]=0,"#DIV/0!",INTIIf([x14-Pure Outstanding List with Last Week Invn & Fcst]![This Week Invn]>[x14-Pure Outstanding List with Last Week Invn & Fcst]![SumOfSumOfCURR_FCST_QTY],[x14-Pure Outstanding List with Last Week Invn & Fcst]![This Week Invn]/[x14-Pure Outstanding List with Last Week Invn & Fcst]![SumOfSumOfCURR_FCST_QTY],0))

If you've already tried that, let me know and we'll look at some other options. If you're storing this data, you could set the field in the table to only accept integers, and the form to do so as well. If it's for a report, we can do that to, the conversion doesn't have to be done in the original formula (although it's probably the best idea).

Kyle ::)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top