Wrox Programmer Forums
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 15th, 2006, 03:12 AM
Registered User
 
Join Date: May 2006
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default please help

Am trying to use Access to prepare a payroll as an assignment but the problem is I dont no the commands to use or how to do it.
This is how the calculation of TAX is to be done in the payroll;

CHARGEABLE RATE TAX CUMULATIVE CUMULATIVE
INCOME(MONTHLY) CHARGEABLE INCOME TAX
1.FIRST ¢200,000 FREE NIL ¢200,000 NIL
2.NEXT ¢200,000 5% ¢10,000 ¢400,000 ¢10,000
3.NEXT ¢1,000,000 10% ¢100,000 ¢1,400,000 ¢110,000
4.NEXT ¢6,600,000 17.5% ¢1,155,000 ¢8,000,000 ¢1,265,000
EXCEEDING ¢8,000,000 @25%

TAX COMPUTATION

TAX= 0.0 + 0.5 X (INCOME - 200,000)
TAX= 10,000 + 0.10 X (INCOME - 400,000)
TAX= 110,000 + 0.175 X (INCOME - 1,400,000)
TAX= 1,265,000 + 0.25 X (INCOME - 8,000,000)

CAN SOMEONE PLEASE HELP ME WITH IT?
THE FUNCTIONS AND EXPRESSIONS TO USE FOR SUCH A PROJECT.
THANK YOU


 
Old May 15th, 2006, 08:21 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

What do your course materials say to do?

mmcdonal
 
Old May 19th, 2006, 07:30 AM
Registered User
 
Join Date: May 2006
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thankx but am not getting you. how do you mean?


 
Old May 19th, 2006, 12:40 PM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

I'm sorry, I thought this was a classroom assignment.

Where does this data need to be calculated? Form, report, table, query?

You may need to code all of the conditions in a function. I would suggest putting the function in a module so it can be reused more easily. But we need to know where the data is going, and if it is being stored in a table. Does it need to be done at run-time, or are you running batch processing?




mmcdonal
 
Old May 19th, 2006, 05:55 PM
Authorized User
 
Join Date: May 2006
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Expression is :
tax = iif(income>8000000,1265000+0.25*(income-8000000),( iif(income>140000,110000+0.175*(income-140000),(...repeating here...))))

??VBA and ACCESS ??
 
Old May 28th, 2006, 08:37 PM
Registered User
 
Join Date: May 2006
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

the data need to be calculated in the query,which will in turn be stored in the tables. it doesn't need to be done at run time it is a batch processing sought of thing.
Quote:
quote:Originally posted by mmcdonal
 I'm sorry, I thought this was a classroom assignment.

Where does this data need to be calculated? Form, report, table, query?

You may need to code all of the conditions in a function. I would suggest putting the function in a module so it can be reused more easily. But we need to know where the data is going, and if it is being stored in a table. Does it need to be done at run-time, or are you running batch processing?




mmcdonal
 
Old May 28th, 2006, 08:41 PM
Registered User
 
Join Date: May 2006
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

THANKS FOR THE EXPRESSION AM ABOUT TO TRY IT.
Quote:
quote:Originally posted by powerz
 Expression is :
tax = iif(income>8000000,1265000+0.25*(income-8000000),( iif(income>140000,110000+0.175*(income-140000),(...repeating here...))))

??VBA and ACCESS ??









Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.