Microsoft KB Archive/155692

= How To Calculate Payments in FoxPro =

Article ID: 155692

Article Last Modified on 6/29/2004

-

APPLIES TO


 * Microsoft Visual FoxPro 3.0 Standard Edition
 * Microsoft Visual FoxPro 3.0b Standard Edition
 * Microsoft Visual FoxPro 5.0 Standard Edition
 * Microsoft Visual FoxPro 6.0 Professional Edition

-



This article was previously published under Q155692



SUMMARY
The PAYMENT function in Visual FoxPro allows the user to calculate a payment amount per month based upon a fixed interest rate.



MORE INFORMATION
The following program displays the monthly payment for a 15-year home mortgage based upon an 8-percent interest rate: nTotal=100000 && total amount borrowed is $100000 nRate=.08/12  && payment is made at the end of each month with fixed && interest rate nPayments=180 && 180 months in 15 year period

cDisplay=MESSAGEBOX("Your monthly payment is" ;     +" "+"$"+ALLTRIM(STR(PAYMENT(nTotal,nRate,nPayments))))

Keywords: kbhowto KB155692

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.