Solved query is too complex in access

hatmak

Registered User.
Local time
Yesterday, 21:14
Joined
Jan 17, 2015
Messages
121
Hi all

i have query have many calculations when i put this formula

Tax_Year: IIf([Yearly_Pool_Tax]<=15000,0,(IIf([Yearly_Pool_Tax]<=30000,([Yearly_Pool_Tax]-15000)*0.025,IIf([Yearly_Pool_Tax]<=45000,([Yearly_Pool_Tax]-30000)*0.1+375,IIf([Yearly_Pool_Tax]<=60000,([Yearly_Pool_Tax]-45000)*0.15+1875,IIf([Yearly_Pool_Tax]<=200000,(([Yearly_Pool_Tax]-60000)*0.2)+4125,IIf([Yearly_Pool_Tax]<=400000,(([Yearly_Pool_Tax]-200000)*0.225)+32125,IIf([Yearly_Pool_Tax]>400000,(([Yearly_Pool_Tax]-400000)*0.25)+77125))))))))+IIf([Yearly_Pool_Tax]>1000000,12875,IIf([Yearly_Pool_Tax]>900000,7875,IIf([Yearly_Pool_Tax]>800000,4875,IIf([Yearly_Pool_Tax]>700000,2625,IIf([Yearly_Pool_Tax]>600000,375,0)))))

i have msg

query is too complex in access

what shall i do ?
his is formula for tax equation

but i made example in other database but it working as it
 

Attachments

Make a custom function in a module. You pass it YearlyPoolTax, it does logic and returns the value.
 
i make a table, tblRule, you review this table
and put the formula in "Expression".
the p in Expression field is the value
to be replaced in Query2 (see also this query).
 

Attachments

You are so amazing arnelgp

I am very grateful to you for helping me


many thanks 🥰🥰🥰
 
make sure you update tblRule with correct Expression.
because on Query2 that i made it is not computing
correctly.
 

Users who are viewing this thread

Back
Top Bottom