By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,454 Members | 3,208 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,454 IT Pros & Developers. It's quick & easy.

Sum/Count on Aggregate Query

P: n/a
I have an aggregate query as recordsource for a form to show a list of
invoices, including the totals (calculated by the aggregate query -
I'm trying to duplicate as little info as possible here).

What I want to achieve is a recordcount (of the number of records
returned by the aggregate query) and Sum of the Invoice totals, but
Access does not seem to like calculating either of these on an
aggregate query.

Any ideas? Am I going about this the wrong way entirely?

TIA

ToastEr
Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
=DCount("*","NameOfAggregateQuery")

The above will give you a recordcount.

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com
"Toby Dann" <to*****@ntlworld.com> wrote in message
news:fb**************************@posting.google.c om...
I have an aggregate query as recordsource for a form to show a list of
invoices, including the totals (calculated by the aggregate query -
I'm trying to duplicate as little info as possible here).

What I want to achieve is a recordcount (of the number of records
returned by the aggregate query) and Sum of the Invoice totals, but
Access does not seem to like calculating either of these on an
aggregate query.

Any ideas? Am I going about this the wrong way entirely?

TIA

ToastEr

Nov 12 '05 #2

P: n/a
Hi and thanks for the reply,

Unfortunately it's not that easy - I'm using a dynamically built SQL
string as recordsource for the form in question to allow for various
filters (view by client only, view unpaid only etc.) so there's no
domain to specify.

Any ideas?

Also I found that if I remove my attempted sum of all invoices field, my
Count([InvoiceID]) works fine (?) but not vice versa - and the Sum of
all Invoices shown is more important.

Thanks again.

does vb cause hair-loss? (:)

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.