Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reports and totals at Report Footer

Status
Not open for further replies.

laina222

Technical User
Sep 7, 2001
172
US
Hi!
I want to create a report and display the total number of entries for my main table at the end of the report. For example, my table is based on a Call Log for Customer Service and at the end of the report I want to show the total number of calls.
Any ideas as to how to do this?
 
You can add a counter to your form to get this. Put a textbox in the detail section (assuming the calls are the detail of the report), name it txtCounter (or any other name), and put this for the control source:

=1

Now set the running sum of that textbox to "Over All". Run the report, you'll see that the field goes 1,2,3,4,etc... all the way up to the end of the report. Now to show that in the report footer (ie: the # of calls), put another unbound textbox with this in the control source:

=[txtCounter]

Now you'll have the total number in the footer, set txtCounter to invisible so it doesn't show (if you'd like) and there's your answer.

Another way to do it, which may be easier is to count the unique id # for each call (assuming you have one, my first explanation assumed you didn't). Put a control in the report footer, set it's control source to:

=Count([MyCallUniqueIDFieldName])

HTH Joe Miller
joe.miller@flotech.net
 
Where can I find the text box's Running Sum property? I looked under properties for my textbox I created and I couldn't find it.
 
It's on the Data tab.
Joe Miller
joe.miller@flotech.net
 
Should I be worried that my Data tab has no RunningSum property?
 
If you are in design view of a report, and you are viewing the properties of a textbox there is always a Running Sum property on the data tab of the textbox properties. Are you sure you added a text box and not a label/combobox/listbox? Something is not right if you don't have one.

Joe Miller
joe.miller@flotech.net
 
Since I can't find anything in the Data Tab that says Running Sum, can I just add the following code in the Before Update Event?
Private Sub txtCounter_BeforeUpdate(Cancel As Integer)
txtCounter.RunningSum = "Over All"
End Sub
Or will that not do the same thing?
 
There is no BeforeUpdate event in a REPORT!! You're modifying a FORM so that's why you have no Running Sum property. If you make a report you'll have the property I'm speaking of.

Joe Miller
joe.miller@flotech.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top