Link to home
Start Free TrialLog in
Avatar of kgittinger
kgittingerFlag for United States of America

asked on

Access If else if syntax problem

Please help with troubleshooting my expression.

I have been asked to write the following statement and am having syntax problems:

The first segement below is my instruction and the second is what I have entered in the expression builder.  
[over60]
If debits(90)>=BAL
Then 	If (BAL-Over30)>0
                     then Over60=(BAL-Over30)
                     else Over60=0
Else over60=(Debits(90)-over30)
Endif
 
 
60To90DayDebits:Sum(IIf([Query1]![SumOf90To120DayDebits]>=[Dbo_Accounts!Balance], IIf([Dbo_Accounts!Balance]-[Query1]![SumOf30To60DayDebits]>0, [Dbo_Accounts!Balance] - [Query1]![SumOf30To60DayDebits]), 0),[Query1]![SumOf60To90DayDebits]-[Query1]![SumOf30To60DayDebits]))

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of kgittinger

ASKER

Looks great.  Thank you!
did you also try did the shorter version?
Both produced the same results.  Thanks you again for all of your help.