|
[x]
Posted via EE Mobile
|
||
Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again. |
||
| Question |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83: 84: 85: 86: |
Private Sub btnCalculate_Click()
Dim rs As Recordset
Dim response
Dim strSQL As String
Dim dblMthRate, dblCapital As Double
Dim x As Long
Me.duration = Int(Me.amount / (Me.payment2 - (Me.payment2 / 100 * 16 + Text0)) + 1)
Me.Months = Me.duration
Me.Requery
If IsNull(Me.Capital_Amount.Value) Or Me.Capital_Amount.Value = 0 Then
response = MsgBox("Capital Value not Set", vbOKOnly)
Else
If IsNull(Me.Months.Value) Or Me.Months.Value = 0 Then
response = MsgBox("Loan Period not Set", vbOKOnly)
Else
dblMthRate = ((1 + Me.Apr) ^ (1 / 12)) - 1
Me.Pament.Value = Me.payment2
strSQL = "DELETE [tbl Loan schedule].*, [tbl Loan schedule].[Loan Id] " & _
"FROM [tbl Loan schedule] " & _
"WHERE ((([tbl Loan schedule].[Loan Id])=" & Str(Me.Loan_Id.Value) & "));"
DoCmd.SetWarnings False
DoCmd.RunSQL (strSQL)
Set rs = CurrentDb.OpenRecordset("tbl Loan schedule")
dblCapital = Me.Capital_Amount.Value
For x = 1 To Me.Months.Value
rs.AddNew
rs![Loan Id] = Me.Loan_Id.Value
rs!PaymentDate = Me.Text21
rs!Month = x
rs!capital = dblCapital
rs!interest = Round(dblCapital * dblMthRate, 2)
rs!Payment = Me.Pament.Value
rs!CredsPaymentDMP = Me.Text4
rs!CredsPaymentDR = Me.Text2
rs!AdminFee = Me.payment2 * 0.16
rs!PlanPayment = rs!Payment - rs!CredsPaymentDMP - rs!CredsPaymentDR - rs!AdminFee
rs!balance = rs!capital + rs!interest - rs!PlanPayment
If rs!balance > 0 Then
rs!balance = rs!balance
Else
rs!balance = 0
rs!Payment = rs!capital + rs!CredsPaymentDMP + rs!CredsPaymentDR + rs!AdminFee
rs!PlanPayment = rs!capital
End If
dblCapital = rs!balance
rs.Update
Next
rs.Close
Set rs = Nothing
Me.Refresh
Me.Repaint
Me.Requery
End If
End If
End Sub
Private Sub Command27_Click()
On Error GoTo Err_Command27_Click
Dim stDocName As String
DoCmd.Close
Exit_Command27_Click:
Exit Sub
Err_Command27_Click:
MsgBox Err.Description
Resume Exit_Command27_Click
End Sub
|
Advertisement
| Hall of Fame |