Bi-weekly due dates for loan repayments (1 Viewer)

jlayaoen

New member
Local time
Yesterday, 23:17
Joined
Mar 27, 2018
Messages
4
Hi. Currently doing a program to calculate the loan repayments with due date, principal, interest and fortnight amortization. May I ask how do I calculate the repayment type to bi-weekly or fortnightly and populate the schedule of due dates bi-weekly automatically from the start date of payment. I only know for the weekly calculation i.e. DueDate = DateAdd("ww", intNumber, Me!Date)

Thank you so much in advance.
 

isladogs

MVP / VIP
Local time
Today, 06:17
Joined
Jan 14, 2017
Messages
18,186
You can use
Code:
?DueDate=DateAdd("d",14,Me.Date)

Note that you shouldn't use Date as a field name as it is a reserved word in Access
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 14:17
Joined
May 7, 2009
Messages
19,169
also
intNumber = 2
DueDate=Me!Date
DueDate = DateAdd("ww", intNumber, DueDate)
 

jlayaoen

New member
Local time
Yesterday, 23:17
Joined
Mar 27, 2018
Messages
4
also
intNumber = 2
DueDate=Me!Date
DueDate = DateAdd("ww", intNumber, DueDate)

Hi Sir ArnelGP.

Thank you for your reply. I tried your suggestion and it was okay on the first due date but the succeeding due dates were only 1 week apart or weekly. If I may attached here my form for your reference please. Note that the first due date should be the same as the starting date of payment. I also wanted to add a combo box to select the frequency of repayments and calculate the same. Appreciate your help.
 

Attachments

  • Loan Repayments.accdb
    1.8 MB · Views: 190

Gasman

Enthusiastic Amateur
Local time
Today, 06:17
Joined
Sep 21, 2011
Messages
14,048
A computer only ever does what you tell it to :(
This is what you have
Code:
    intNumber = 0
    DueDate = Me!Date
 
    Do While intNumber <> Me.Term
    
        'dbs.Execute "INSERT INTO [Application Form Details] ( AppID, Number, Interest, Total ) VALUES (" & Me.AppID & ", " & intNumber & ", '" & curInterest & "', '" & curTotal & "');"
        With rst
            .AddNew
            !AppID = Me!AppID
            !Number = intNumber
            !DueDate = DateAdd("ww", intNumber, DueDate)
            !Interest = curInterest
            !Total = curTotal
            .Update
        End With
        
        intNumber = intNumber + 1
    Loop
    Me.Refresh
End Sub

Nowhere in that code do you attempt to calculate what intNumber is meant to be?, you just increment it by 1, which is weekly?
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 14:17
Joined
May 7, 2009
Messages
19,169
see the changes in the code and in table Frequency.
 

Attachments

  • Loan Repayments.zip
    272 KB · Views: 234

Users who are viewing this thread

Top Bottom