- Using the CompoundInterest table, design a form as follows:
- Set the Name of the frame that contains the radio (option) buttons
to fraFrequency
- Save it as CompoundInterest
- To create text boxes that would be used as variables, in the
Toolbox, click the Text Box control and click in the left area of the
Form Footer section
- Change the caption of the label to Compound Type
- Using the Properties window, change the following characteristics of
the text box
Name: txtCompoundType
Record Source: =Switch([fraFrequency]=1,12,[fraFrequency]=2,4,[fraFrequency]=3,2,[fraFrequency]=4,1)
Visible: No
- Add another text box to the right of the previous one. Change its
label's caption to i
- In the Properties window, change the following characteristics:
Name: txti
Record Source: =CDbl(Nz([Interest]))/Nz([txtCompoundType])
Visible: No
- Add another text box to the right of the previous one. Change its
label's caption to n
- Using the Properties window, change the following characteristics
Name: txtn
Record Source: =Nz([txtCompoundType])*CInt(Nz([Periods]))
Visible: No
- Expand the Detail section if necessary. Add a Rectangle box in the
bottom area of the Detail section
- Add a label to the top border of the rectangle to appear like a
group box or frame. Change the label's caption to Results
- Inside the rectangle, add a text box. Change its label's caption to Interest Earned
- In the Properties window, change the following characteristics of
the text box:
Name: txtInterestEarned
Record Source: =Nz([txtAmountEarned])-Nz([Principal])
Format: Currency
Decimal Places: 2
- Add another text box inside the rectangle and to the right of the
previous one. Change its label's caption to Amount Earned
- In the Properties window, change the following characteristics of
the text box:
Name: txtAmountEarned
Record Source: =Nz([Principal])*((1+CDbl([txti]))^CInt([txtn]))
Format: Currency
Decimal Places: 2
- Reposition the controls so your form appears designed as follows:
- Save and switch the form to Form View
- Process a few loans to see the result
- Close the form
|