BBK
Registered User.
- Local time
- Today, 20:27
- Joined
- Jul 19, 2010
- Messages
- 71
I have 3 text boxes in a form
- Rent Amount is user input field
- Payment frequency is dropdown combo box with weekly rent or monthly rent
- Monthly Rent Due - is calculation field with this formula =[RentAmount]*Switch([PaymentFrequency]="Monthly Rent",1,[PaymentFrequency]="Weekly Rent",13/3
I am trying to write a query to sum the monthly rent due and give me an average of rent due for the month.
But when i bring the field MonthlyRentDue into my query it is giving me incorrect value back for any weekly rent (seems to multiply * 4) e.g I have one tenant paying $165 pw but it should be $715 per month as per formula above which is correct but when i do my query and run it giving a figure of $660 which is not correct.
This is sql code for my query
SELECT tblLease.LeaseID, tblLease.PaymentFrequency, tblLease.MonthlyRentDue
FROM tblLease;
Any help is really appreciated as I have spent all day trying to figure it out.
Thanks
- Rent Amount is user input field
- Payment frequency is dropdown combo box with weekly rent or monthly rent
- Monthly Rent Due - is calculation field with this formula =[RentAmount]*Switch([PaymentFrequency]="Monthly Rent",1,[PaymentFrequency]="Weekly Rent",13/3
I am trying to write a query to sum the monthly rent due and give me an average of rent due for the month.
But when i bring the field MonthlyRentDue into my query it is giving me incorrect value back for any weekly rent (seems to multiply * 4) e.g I have one tenant paying $165 pw but it should be $715 per month as per formula above which is correct but when i do my query and run it giving a figure of $660 which is not correct.
This is sql code for my query
SELECT tblLease.LeaseID, tblLease.PaymentFrequency, tblLease.MonthlyRentDue
FROM tblLease;
Any help is really appreciated as I have spent all day trying to figure it out.
Thanks