BBK
Registered User.
- Local time
- Today, 07:10
- Joined
- Jul 19, 2010
- Messages
- 71
I want to create a query that by entering a 'Location' and a specific time frame eg Jan 21- Dec 12 it will return the total amount paid/received on that Location during that time frame.
(Enter a location
Enter a beginning date
Enter a end date
And the query to return the 'Total Amount Paid' for that 'Location' during the dates entered.)
Having big problems with this one, any help or advice gladly accepted and appreciated.
(Enter a location
Enter a beginning date
Enter a end date
And the query to return the 'Total Amount Paid' for that 'Location' during the dates entered.)
Code:
SELECT tblProperty.Address, Sum(tblPayment.AmountPaid) AS SumOfAmountPaid
FROM tblProperty INNER JOIN (tblLease INNER JOIN tblPayment ON tblLease.TenantID = tblPayment.TenantID) ON tblProperty.PropertyID = tblLease.PropertyID
GROUP BY tblProperty.Address
HAVING (((tblProperty.Address) Like "*" & [Enter Location:] & "*")) AND (((tblPayment.DatePaid) Between [Enter the beginning date:] And [Enter the end date:]));
Having big problems with this one, any help or advice gladly accepted and appreciated.