I'm trying to design a database for my company that calculates interest paid on a loan based on the number of days there is left in that month.
For example, if a loan is taken out on Jan 27, they have to pay 5 days of interest for that month (including the day the loan is taken out).
So i'm trying to write an update query that will automatically update a field based on the current month's number of days - the day the loan was taken out + 1 (to include that day).
What I have is a date serial update that doesnt seem to want to run:
UPDATE tbl_Loan SET tbl_Loan.DaysInMonth = DateSerial(Year(Now()),Month(Now()), Day(Now())-[forms]![frm_Update].[textbox1]+1
The value to update in the field to be just a number (for the number of days of interest to pay). Any help is extremely appreciated. Thank you,
Brendan
For example, if a loan is taken out on Jan 27, they have to pay 5 days of interest for that month (including the day the loan is taken out).
So i'm trying to write an update query that will automatically update a field based on the current month's number of days - the day the loan was taken out + 1 (to include that day).
What I have is a date serial update that doesnt seem to want to run:
UPDATE tbl_Loan SET tbl_Loan.DaysInMonth = DateSerial(Year(Now()),Month(Now()), Day(Now())-[forms]![frm_Update].[textbox1]+1
The value to update in the field to be just a number (for the number of days of interest to pay). Any help is extremely appreciated. Thank you,
Brendan