Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Display record count on an Access report

Posted on 2011-03-23
2
Medium Priority
?
438 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 44

Accepted Solution

by:
GRayL earned 600 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 400 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

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

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

Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
Instead of error trapping or hard-coding for non-updateable fields when using QODBC, let VBA automatically disable them when forms open. This way, users can view but not change the data. Part 1 explained how to use schema tables to do this. Part 2 h…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

721 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