calculating in a report

  • Thread starter Thread starter JWalk
  • Start date Start date
J

JWalk

i have a report that needs to calculate a total bassed on user input. Ex.
assigned = 1 attached = 1 and detached = -1 i need to total the values
together i'm either doing my iif wrong or going the wrong way about it thank
you for your time
 
STRENGTH: IIf([Assigned]="ASSIGNED" Or "ATTACHED",+1,-2)

the tree options for spersonel strenghth is assigned, attached, and detached
assigned would add one to the total and attached would add one to the total
also, however detached would take away from the total the total is strength
 
Only a minor syntax error. COBOL is the only language I know of that will
allow you to check multiple values that way. Here is what you need:

STRENGTH: IIf([Assigned]="ASSIGNED" Or [Assigned]="ATTACHED",+1,-2)
--
Dave Hargis, Microsoft Access MVP


JWalk said:
STRENGTH: IIf([Assigned]="ASSIGNED" Or "ATTACHED",+1,-2)

the tree options for spersonel strenghth is assigned, attached, and detached
assigned would add one to the total and attached would add one to the total
also, however detached would take away from the total the total is strength
Klatuu said:
Post your code and a bit more info, your question is not clear.
 
Thanks for the syntax help and the code works wonderfully now. I'm combining
the code with a crosstab to accomplish my project thank you for the help and
keep an eye out I'll have more questions later I'm sure.

Klatuu said:
Only a minor syntax error. COBOL is the only language I know of that will
allow you to check multiple values that way. Here is what you need:

STRENGTH: IIf([Assigned]="ASSIGNED" Or [Assigned]="ATTACHED",+1,-2)
--
Dave Hargis, Microsoft Access MVP


JWalk said:
STRENGTH: IIf([Assigned]="ASSIGNED" Or "ATTACHED",+1,-2)

the tree options for spersonel strenghth is assigned, attached, and detached
assigned would add one to the total and attached would add one to the total
also, however detached would take away from the total the total is strength
Klatuu said:
Post your code and a bit more info, your question is not clear.
--
Dave Hargis, Microsoft Access MVP


:

i have a report that needs to calculate a total bassed on user input. Ex.
assigned = 1 attached = 1 and detached = -1 i need to total the values
together i'm either doing my iif wrong or going the wrong way about it thank
you for your time
 
Back
Top