Solved

Display record count on an Access report

Posted on 2011-03-23
2
427 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 - Access MVP)
DatabaseMX (Joe Anderson - Access MVP) 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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

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…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

760 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now