home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DOS/V Power Report 1997 March
/
VPR9703A.ISO
/
MS_DEV
/
VID
/
SERVER
/
ASF
/
DATA.Z
/
script7.asp
< prev
next >
Wrap
Text File
|
1996-10-22
|
2KB
|
75 lines
<H3><a name="finsamp">Use this form to determine the future value of a savings plan.</a></H3>
<FORM METHOD=POST ACTION="atumd3.asp#note">
<TABLE>
<TR>
<TD>How much do you plan to save each month?
<TD><INPUT TYPE=TEXT NAME=Payment>
<TR> <TD>Enter the expected interest annual percentage rate.
<TD><INPUT TYPE=TEXT NAME=APR>
<TR>
<TD>For how many months do you expect to save?
<TD><INPUT TYPE=TEXT NAME=TotPmts>
<TR>
<TD>Do you make payments at the beginning or end of month?
<TD><INPUT TYPE=RADIO NAME=PayType VALUE="Beginning" CHECKED>Beginning
<INPUT TYPE=RADIO NAME=PayType VALUE="End">End
<TR>
<TD>How much is in this savings account now?
<TD><INPUT TYPE=TEXT NAME=PVal>
<TR>
<TD>
<TD><INPUT TYPE=SUBMIT VALUE=" Calculate Future Value ">
</TABLE>
<%
If Request.form("Payment")<>"" then
' Check to see if an Annual Percentage Rate
' was entered
If IsNumeric(Request("APR")) Then
' Ensure proper form.
If Request("APR") > 1 Then
APR = Request("APR") / 100
Else
APR = Request("APR")
End If
Else
APR = 0
End If
' Check to see if a value for Total Payments
' was entered
If IsNumeric(Request("TotPmts")) Then
TotPmts = Request("TotPmts")
Else
TotPmts = 0
End If
' Check to see if a value for Payment Amount
' was entered
If IsNumeric(Request("Payment")) Then
Payment = Request("Payment")
Else
Payment = 0
End If
' Check to see if a value for Account Present Value
' was entered
If IsNumeric(Request("PVal")) Then
PVal = Request("PVal")
Else
PVal = 0
End If
If Request("PayType") = "Beginning" Then
PayType = 1 ' BeginPeriod
Else
PayType = 0 ' EndPeriod
End If
' Create an instance of the Finance object
Set Finance = Server.CreateObject("MS.Finance")
' Use your instance of the Finance object to
' calculate the future value of the submitted
' savings plan using the HTML form and the
' CalcFV method
FVal = Finance.CalcFV(APR / 12, TotPmts, -Payment, -PVal, PayType)
%>
<H3>Your savings will be worth <% = FVal %>.</H3>
<%End If %>