PC Review


Reply
Thread Tools Rate Thread

Code for Access Help

 
 
ChrisSAustin
Guest
Posts: n/a
 
      10th May 2010
Hello,

I need to create a report that seperates a total fee into one monthly charge
of X%, then equal monthly amounts depending on the contract length. ie a
$1000 charge with a 25% first payment and 11 month contract would show a
first month charge of $250 then 10 equal payments of $75.

My input is a table with the following column headings: Account#, Total Fee,
Contract length, FirstMonthPercentage.

I would like the output to be a table with the same columns as above, but
with each months payment following on the same row.

Although I am pretty good with Access, I do not know any VB and can't think
of a way to do this with a macro. I tried using a query that calculated 12
months but it became too complicated to run.

Thanks
 
Reply With Quote
 
 
 
 
Beetle
Guest
Posts: n/a
 
      10th May 2010
You shouldn't need code for this, a simple query should do the trick;

SELECT [AccountNo], [TotalFee], [ContractLength], [FirstMonthPercent],
[TotalFee]*[FirstMonthPercent] AS FirstMonthAmount, [ContractLength]-1 AS
MonthsRemaining, ([TotalFee]-[FirstMonthAmount])/[MonthsRemaining] AS
MonthlyPayment
FROM YourTable;

Something like the above query should work if you just need to generate
a simple report at the beginning of the contract period. Also, I have
assumed that your FirstMonthPercent field is a Single or Double data
type with values like .10, .25, etc. and that no fields will be Null or have
zero as the amount (otherwise you'll get a division by zero error in the
calculated MonthlyPayment field). If those assumptions are incorrect then
the query would have to be modified to account for that.

--
_________

Sean Bailey


"ChrisSAustin" wrote:

> Hello,
>
> I need to create a report that seperates a total fee into one monthly charge
> of X%, then equal monthly amounts depending on the contract length. ie a
> $1000 charge with a 25% first payment and 11 month contract would show a
> first month charge of $250 then 10 equal payments of $75.
>
> My input is a table with the following column headings: Account#, Total Fee,
> Contract length, FirstMonthPercentage.
>
> I would like the output to be a table with the same columns as above, but
> with each months payment following on the same row.
>
> Although I am pretty good with Access, I do not know any VB and can't think
> of a way to do this with a macro. I tried using a query that calculated 12
> months but it became too complicated to run.
>
> Thanks

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel code convert to Access code - Concat & eliminate duplicates italia Microsoft Access Queries 1 12th Sep 2006 07:22 PM
Excel code convert to Access code - Concat & eliminate duplicates italia Microsoft Access 2 12th Sep 2006 06:13 PM
Excel code convert to Access code - Concat & eliminate duplicates italia Microsoft Access Macros 0 12th Sep 2006 05:04 PM
Excel code convert to Access code - Concat & eliminate duplicates italia Microsoft Excel Programming 1 12th Sep 2006 12:14 AM
VB6 - Access ADP Database Custom Property / Or Read Line of Code In ADP Code Module WhatTha Microsoft Access VBA Modules 0 24th Jan 2006 03:26 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:10 PM.