Solved

Display record count on an Access report

Posted on 2011-03-23
2
431 Views
Last Modified: 2012-05-11
I have an existing Access report whose record source is a union query.
The primary key of each of the tables is a compound key if I'm using the correct terminology (the primary key of each table is made up of 4 separate fields)

I need to display the total record count of the records on my report.  Let's say my report displays 100 line items (ie records).  I need to also display something like "Total Records: 100" or whatever.  How do I do it?
0
Comment
Question by:dbfromnewjersey
2 Comments
 
LVL 44

Accepted Solution

by:
GRayL earned 150 total points
ID: 35200495
use DCount()

in a text box make the control source property:

=DCount("*","qryortblName")

replace qryortblName with the actual name of the query or table to which the report is bound.
0
 
LVL 75

Assisted Solution

by:DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform) earned 100 total points
ID: 35200656
Side Note:

"The primary key of each of the tables is a compound key if I'm using the correct terminology (the primary key of each table is made up of 4 separate fields)"
Highly recommend you make the Access AutoCounter the Primary Key, then - if necessary, create a Compound Unique Index on those 4 fields (easy to do).  A compound PK is a PITA, especially when create relationships based on that table and/or when you need to refer to the PK form elsewhere, say in code ... even joins in queries.

mx
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question