var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: if statement or switch case
I am working on a tax calculation program. i want to use multi if statement in the manner below:-
and income>110000 and income<=150000
then tax=(income-110000) *10
elseif if sex=male
and income>150000 and income<=250000
elseif sex = male
Please tell what will be the proper syntax for this problem in access and where to write this code.
Thanks in advance.
What if sex<>male?
Where to write the code depends on what your doing with the results.
Actually there are three categories, Male, Female and Senior Citizen.
Different parameters for tax deduction for each category.
I want to save the results in table. I dont know the very deep access. I just used the AfterUpdate event to do my other calculations.
You could use either nested selects or a select with if statements. I'd determine sex first, then determine income level within sex. You could perform these calculation AfterUpdate as well.
I would go for option C - you didn't give an option C, but I am proposing one (with the benefit of the advice of an excellent author)
To cover one really good reason for this - what happens when the boudaries change (which one day they will)?
ur codings are working excelent.
Rogue, can you give me the full syntax for this. I will be very thankful to you.
There's a good example of a select case statement in VBA help. Take a bash and post back if you have problems. I would also take a look at the link that Pootle posted. Since you're dealing with taxes, that's probably the best route to take.