Text Field Access 2003

D

Denver

Hi,

I have a text field [Done] with control source
=IIf([Status 2]="SCEC","NA",(IIf([Status 2]="SEGI","NA",(IIf([Status
2]="SLSA",[Text386])))))

I have Text414 with control source =Sum(IIf(Me!Done<>"NA",1,0)).
I want this Text414 to Sum field[Done] <> "NA"?
What do I miss in my Formula =Sum(IIf(Me!Done<>"NA",1,0))
this formula gives me a 0
when i try doing this =Sum(IIf(Me!Done<>"NA",0,1))
it gives me 18 instead of 993, this formula do not do summation but count
number of item.

thanks for any help, I appreciate.
 
R

Rick Brandt

Hi,

I have a text field [Done] with control source =IIf([Status
2]="SCEC","NA",(IIf([Status 2]="SEGI","NA",(IIf([Status
2]="SLSA",[Text386])))))

I have Text414 with control source =Sum(IIf(Me!Done<>"NA",1,0)). I want
this Text414 to Sum field[Done] <> "NA"? What do I miss in my Formula
=Sum(IIf(Me!Done<>"NA",1,0)) this formula gives me a 0
when i try doing this =Sum(IIf(Me!Done<>"NA",0,1)) it gives me 18
instead of 993, this formula do not do summation but count number of
item.

thanks for any help, I appreciate.

You can't use Sum() on a control, only on fields. You need to repeat the
entire formula that you used in your [Done] Textbox inside the Sum()
function.

Likely better would be to move the [Done] from an expression in your
report to an expression in the query the report is bound to. Then you
could use Sum() on it in the report.
 
K

kc-mass

For starters you need to complet your last IIF like

=IIf([Status 2]="SCEC","NA",(IIf([Status 2]="SEGI","NA",(IIf([Status
2]="SLSA",[Text386] , Something )))))

Denver said:
Hi,

I have a text field [Done] with control source
=IIf([Status 2]="SCEC","NA",(IIf([Status 2]="SEGI","NA",(IIf([Status
2]="SLSA",[Text386])))))

I have Text414 with control source =Sum(IIf(Me!Done<>"NA",1,0)).
I want this Text414 to Sum field[Done] <> "NA"?
What do I miss in my Formula =Sum(IIf(Me!Done<>"NA",1,0))
this formula gives me a 0
when i try doing this =Sum(IIf(Me!Done<>"NA",0,1))
it gives me 18 instead of 993, this formula do not do summation but count
number of item.

thanks for any help, I appreciate.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top