Solved

Display record count on an Access report

Posted on 2011-03-23
2
428 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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Access Runtime 2010 Error 17 32
Open a Specific Record With a Specific Tab Page 5 31
Unrecognized Database Format 8 93
Problem with syntax with TransferDatabase 3 15
In the article entitled Working with Objects – Part 1 (http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_4942-Working-with-Objects-Part-1.html), you learned the basics of working with objects, properties, methods, and events. In Work…
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…
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…

920 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

16 Experts available now in Live!

Get 1:1 Help Now