473,378 Members | 1,605 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Microsoft Access: Showing a sum total of number of records in a Report

Hello:

I have been trying to figure out how to automatically show a "sum total" of the number of records (from the underlying query) in report form.

For example, if the design view of a query lists 25 records, how can i visually show the "25" number in a report that is linked to this query?

Thank you
Nov 21 '07 #1
5 3533
BradHodge
166 Expert 100+
You can add a text box to your report. In the Control Source Property, put...

=DCount("MyQueryName", "MyPrimaryField")

That will add the number of records to your text box when the report runs. If you want to then format it for eye appeal, you could do something like this in the Control Source...

="Total Records in this Report = " & DCount("MyQueryName", MyPrimaryField")

Hope that helps,
Brad.
Nov 21 '07 #2
Brad:

The name of my underlying query is "qrydataentryerrors" and the primary key for the underlying table is "ID".

I created a text box in the report footer and added =DCount([qrydataentryerrors],[ID]) to the control source.

That did not work. Am I missing something? Is the syntax incorrect?

Thank you,

Eric
Nov 23 '07 #3
BradHodge
166 Expert 100+
Brad:

The name of my underlying query is "qrydataentryerrors" and the primary key for the underlying table is "ID".

I created a text box in the report footer and added =DCount([qrydataentryerrors],[ID]) to the control source.

That did not work. Am I missing something? Is the syntax incorrect?

Thank you,

Eric
Eric,

For one, I steered you wrong. My apologies. You should have your field name listed before your query name.

Second, I would suggest using quotes around your field name and your table instead of brackets.

It should look something like this...
Expand|Select|Wrap|Line Numbers
  1. DCount("ID", "qrydataentryerrors")
It helps when someone doesn't tell you to turn right when you are supposed to be turning left :)

Brad.
Nov 23 '07 #4
Hi there. I have a question in this area. I hope you don't mind me chiming in.

I am summing records. Each month I want to sum my record count by month and year to date (YTD); providing both report counts at the end.

I am using this for monthly and it works fine:

="Monthly Summary for " & "'IS #' = " & " " & [IS #] & " (" & Count(*) & " " & IIf(Count(*)=1,"detail record","detail records") & ")"

I don't understand what to write to sum the record count YTD.

Can you help?
Nov 25 '07 #5
Hi there. I have a question in this area. I hope you don't mind me chiming in.

I am summing records. Each month I want to sum my record count by month and year to date (YTD); providing both report counts at the end.

I am using this for monthly and it works fine:

="Monthly Summary for " & "'IS #' = " & " " & [IS #] & " (" & Count(*) & " " & IIf(Count(*)=1,"detail record","detail records") & ")"

I don't understand what to write to sum the record count YTD.

Can you help?
From thescripts resources I found “Count Data on a Report & summarize it at the end”-beacon & Jim Doherty" through this I realized that I had a footer thing going on. As soon as I moved all of the summing elements that were incorrectley summing into a subsequent footer the suming behaves the way I want it to. Glad to know I have that back up.

But, what if multiple footers sum & counting on one page?
Nov 25 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

14
by: Sean C. | last post by:
Helpful folks, Most of my previous experience with DB2 was on s390 mainframe systems and the optimizer on this platform always seemed very predictable and consistent. Since moving to a WinNT/UDB...
4
by: Sondra Wilson | last post by:
I have created a sorted query. The total(records) I get in the query is correct. My problem lies with getting that total into my report. I use count to insert the total number of records in my...
8
by: Riegnman | last post by:
Hey guys, I'm in need of a little help. I am very new to access but have been trying to learn. My problem is as follows. . . We have time clocks that dump the badge punches into a .log file on...
3
by: CSDunn | last post by:
Hello, I have a situation with MS Access 2000 in which I need to display report data in spreadsheet orientation (much like a datasheet view for a form). If you think of the report in terms of what...
11
by: Mr. Smith | last post by:
Hello all, My code can successfully open, write to, format and save several worksheets in a workbook then save it by a given name, close and quit excel. My problem is that if I try and do it...
24
by: Bob Alston | last post by:
Most of my Access database implementations have been fairly small in terms of data volume and number of concurrent users. So far I haven't had performance issues to worry about. <knock on wood> ...
1
by: Brad | last post by:
Thanks for taking the time to read my question. I have a table of data that has Date, Data and Category. I need to show, in a report, each Categories Data by Date. The Date has to be it's own...
2
by: ricktech101 | last post by:
Hi, I have a table with a field that shows the number of pieces that a parcel contains. It looks like this: ParcelID, Pieces, Description Data example: 1001, 5, Jackets 1002, 10, shoes etc
7
by: ddecoste | last post by:
I have a need to add a visual representation to some data in Access. I need to draw a matix of squares inside another square. I have all the data that I need in a record in Access. The data...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.