I'm having troubles with a report I've created. You make some
selections on a form which then sets a reports filter property and
opens the report, this works fine. One bigger problem I've had is that
any of my running totals are still showing totals as if there was no
filter.
I filter on 2 things one being a customer, two being a date. If I
select a specific customer the totals will properly show total spent
for that customer, but if i run the report with that customer but also
select a date range, it will show only the data within that date range,
but the running totals still show totals as if there is no date range
(I'm using Sum(amount) in a textbox.
If anyone could help me out it would be greatly appreciated, thanks!
The free downloadable sample database at www.bullschmidt.com/access
uses the query by form concept so that on the invoices dialog one can
optionally choose a rep, a customer, and perhaps a date range, click on
a button that says "Input," and then have the invoice form open up
showing all the invoices that match the criteria.
Best regards,
J. Paul Schmidt, Freelance Web and Database Developer
http://www.Bullschmidt.com
Access Database Sample, Web Database Sample, ASP Design Tips
Consider the following thread:
Then replace the WHERE clause with Me.Filter.
Something like:
txtPaymentTotal.ControlSource = SumSQLRecords("SELECT Amount FROM
tblPayments WHERE " & Me.Filter & ";")
Using this method the public function can also return the sum of
records that are partially or totally independent of the report's
RecordSource and Filter if desired.
James A. Fortune