Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Loan term and purchase date= each payment date

Status
Not open for further replies.

Vol

Technical User
Sep 11, 2000
18
US
I basically need to enter in the purchase date, loan term and have all of the payment dates automatically fill in.

[PurchaseDate]
[TermOfContract]=
[Due Date 1]
[Due Date 2]
[Due Date 3], etc...

:-Q
Thanks to anyone that can help!


[sig]<p>C. Szymanski<br><a href=mailto:V0lup2us@aol.com>V0lup2us@aol.com</a><br>[/sig]
 
Vol,

The short answer appears to be &quot;DateAdd&quot;.

Assuming the Term of the contract is an integer,

For Idx = 1 to TermOfContract
[tab] Due Date & Idx = DateAdd(&quot;m&quot;, Idx, PurchaseDate)
Next Idx

You post apprars to indicate that the Due Date Idx valuse are fields in a table. If so, this is somewhat different than the normalized version of the typical loan table.

You may want to review the schema of the database to assure that you are not creating something which will be diufficult to manage in the long run. [sig]<p>MichaelRed<br><a href=mailto:mred@duvallgroup.com>mred@duvallgroup.com</a><br>There is never time to do it right but there is always time to do it over[/sig]
 
Thanks Michael,

So then, can you suggest the best way to set up my table so that it's more like a 'normal' loan table? I'm just now getting started with this type of database, any help you could provide would be most excellent!*:->*

[sig]<p>C. Szymanski<br><a href=mailto:V0lup2us@aol.com>V0lup2us@aol.com</a><br>[/sig]
 
Just taking a quick stab.

Looks like you might want to have the following tables:

Customer Info:
Customer_ID
Customer_Name
Etc...

Purchase Info:
Purchase_ID
Customer_ID
Purchase_Date
TermOfContract
ItemsPurchased
Etc...

Payments Info:
Purchase_ID
Customer_ID
PaymentDueDate
PaymentRecdDate
Etc...


Every customer may have several purchases. (One to many)
Every purchase may have several payment records. (One to many)
Each record in the Payments table is one payment from a purchase, from a customer.

Hope this is a start...

[sig]<p>Terry M. Hoey<br><a href=mailto:th3856@txmail.sbc.com>th3856@txmail.sbc.com</a><br><a href= > </a><br>Ever notice that by the time that you realize that you ran a truncate script on the wrong instance, it is too late to stop it?[/sig]
 
Vol,

Terry has the beginnings. You should get some tutorial on relational (database) design and implementation. Simply defining a lot of fields in one or more tables is not the way to go. Relational designs need to be carefully thought out, implemented on a test basis, tested thoroughly and then modified to suit the overall process.

[sig]<p>MichaelRed<br><a href=mailto:mred@duvallgroup.com>mred@duvallgroup.com</a><br>There is never time to do it right but there is always time to do it over[/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top