wizardchef
Technical User
I have been away from Access programming for several months. I have a query run (in an ap I designed) on a typical customer database where on a given date, a customer may make more than one purchase. I also record a single payment amount for each order.
When I create the report, with the report bound that that query, and try to sum the payments in the footer, I get an incorrect sum for the total payments over a period (multiple purchases on a single date result in two instances of the payment in the query). The reason is because the query produces a payment entry for each transaction on a given date. So, if a customer has more than one purchase on a given date, the payment amount appears multiple times and appears in the summation.
What is the easiest solution to this problem (I have tried using two separate queries ...one for details and one for payment ... and a subreport in the main report, but can't get that to work)?
When I create the report, with the report bound that that query, and try to sum the payments in the footer, I get an incorrect sum for the total payments over a period (multiple purchases on a single date result in two instances of the payment in the query). The reason is because the query produces a payment entry for each transaction on a given date. So, if a customer has more than one purchase on a given date, the payment amount appears multiple times and appears in the summation.
What is the easiest solution to this problem (I have tried using two separate queries ...one for details and one for payment ... and a subreport in the main report, but can't get that to work)?