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

Code in report

Status
Not open for further replies.

Ptrif

Technical User
May 19, 2003
106
US
Someone at one time helped me with a report. I was wondering if any of you could tell me what the 1,0 in this code actually does....any help is appreciated..

=Sum(IIf(Left([Reason],4)="Tardy",1,0))
 
Bit confused there. It says if the left 4 characters of reason = 'Tardy' (5 characters) return 1 if not 0 then sum the value of the returns.
 
It looks like it's a count of the number of "Tardy"s...but SuicidED is right, the total is always going to be 0...you should make it (Left([Reason],5)). Hope that helps.

Kevin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top