Control Source Equation Help

Chris-eh

Registered User.
Local time
Today, 17:50
Joined
Aug 14, 2002
Messages
30
I'm trying to combine three calculated fields into one field that will total all 3.The trick is only one of the two fields are to be included like an "or" statement What I'm trying to say is if all three calculated fields are true in one then it equals 3 and the other will equal 0 to be added to this other fields calculated answer.

Here have a look:
The 3 fields are WCAccess; (SumBathtub; SumRollShower) with the 2 in brackets being the one or other only. These are fields named on the report not actual fields from tables.
Thought this would work but report doesn't recognize:

PartG:=(Sum(IIf([SumBathtub]="3",3,0)) Or IIf([SumRollShower]="3",3,0))+([WCAccess])

These are fields named on the report not actual fields from tables.
These are the calculations relating to these fields on this report:

WCAcess=(Sum(IIf([Washbasin Accessibility]="Yes",1,0)))+(Sum(IIf([Washbasin Space]="Yes",1,0)))+(Sum(IIf([BDrainpipe Insolation]="Yes",1,0)))

SumBathtub=(Sum(IIf([Type of Bathing Facility]="Bathtub",1,0)))+(Sum(IIf([Floor Space]="Yes",1,0)))+(Sum(IIf([Bathtub Grab Bars]="Yes",1,0)))

SumRollShower=(Sum(IIf([Type of Bathing Facility]="Roll-in Shower",1,0)))+(Sum(IIf([Seat in Shower]="Yes",1,0)))+(Sum(IIf([Curb Height]="No",1,0)))


Any thoughts on One equation for a field that will calculate Part G: which would combine all???I've tried many combinations get #error or 3
Thanks
 
I think I got it

formula:

=IIf([SumBathtub]<="2",0,3)+IIf([SumRollShower]<="2",0,3)+([WCAccess])

=6

WCAccess = 3

SumBathtub = 3 (true)
SumRollShower = 1 (false)

If one of those two is <3 I didn't want it to add the answer for that grouping.

Thanks anywho
 

Users who are viewing this thread

Back
Top Bottom