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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sum Issue (and then some!)

Status
Not open for further replies.

proximity

Technical User
Sep 19, 2002
132
GB
Hi everyone,

I have a calculation on a report:

=Sum(IIf([Var]>=1,[Var],0))+rptSubDiscrepNotAdvised.Report!txtOvers-1

This gives me the desired result.

How can I change the calculation so that it only works if a value of 999/9999 (in a field - a text field - called txtCat) is not returned? Or to put it another way, I want it to minus 1 off the result if there is a value of 999/9999 returned and to not minus it if there isn't!!!!

Hope I have explained it correctly!

Many thanks.
 
Code:
=Sum(IIf([Var]>=1,[Var],0))+ rptSubDiscrepNotAdvised.Report!txtOvers - IIF(txtCat = "999/9999", 1, 0)

I assumed of course your value was a single text value.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top