Text Field Access 2003

  • Thread starter Thread starter Denver
  • Start date Start date
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.
 
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.
 
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.
 
Back
Top