How to Count Number of Records in Select Query

G

Guest

I have a select query. However, I can't figure out a way of determining the
number of records returned by that query. I want to display that number in a
form or possibly subform. From what I've read, I need to use Dcount, but I
can't seem to get it to work properly within the query. I see what Dcount
can be used with tables, but I haven't seen where it can be used with
queries. I've also seen where one can use RecordSet.RecordCount, but I don't
know where to put that in my query. Any (hopefully, simple) solutions would
be greatly appreciated.

Thanks in advance.
 
F

fredg

I have a select query. However, I can't figure out a way of determining the
number of records returned by that query. I want to display that number in a
form or possibly subform. From what I've read, I need to use Dcount, but I
can't seem to get it to work properly within the query. I see what Dcount
can be used with tables, but I haven't seen where it can be used with
queries. I've also seen where one can use RecordSet.RecordCount, but I don't
know where to put that in my query. Any (hopefully, simple) solutions would
be greatly appreciated.

Thanks in advance.

If you just wish to show how many records are returned by the query,
you don't need to do it within the query.

Using an unbound control on a form or in a report:
=DCount("*","QueryName")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top