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

Help summing IIf statement

Status
Not open for further replies.

mikelev

Technical User
Mar 23, 2004
223
0
0
US
Any idea how to sum this?

=IIf(([wl]=0),0,IIf(([text80]=0),0,([wl]/[text80])))

Tried:

=Sum(IIf(([wl]=0),0,IIf(([text80]=0),0,([wl]/[text80]))))

It prompts me for "wl" value and "Text80" values?


It a never ending learning curve....
 
mikelev
Have you tried
=Sum(Abs((IIf(([wl]=0),0,IIf(([text80]=0),0,([wl]/[text80])))))

Tom
 
Howdy Tom:

Thanks for the response. Placing the code in the control souce caused the same result.

Cheers,
 
You can't sum controls. I assume text80 is an default-named text box.

You can sum the expressions from control sources of controls. Pretend there aren't controls in the detail section.

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