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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Prompting for a "Total" in a Report

Status
Not open for further replies.

Benj

Programmer
Nov 30, 1999
7
GB
I have set up a form that reads information entered on it and then opens up a report depending upon the information entered. This works fine, but what I am trying to do is when someone selects &quot;All&quot; on the form, for the Report to show totals instead of listing each item on the table in categories.<br>
<br>
i.e. In a table you have fields - Person, Category,& Spend<br>
On the form someone chooses Person = &quot;All&quot;<br>
Category = &quot;All&quot;<br>
<br>
I then want the report to do a &quot;Total&quot; for each category that everyone has spent, without listing each person.<br>
<br>
How could I code such procedure?? <p>Ben Smith<br><a href=mailto:Ben.Smith@nswl-tr.nwest.nhs.uk>Ben.Smith@nswl-tr.nwest.nhs.uk</a><br><a href= > </a><br>
 
Consider creating a separate query & report for the &quot;All&quot; information. Use the query Total/Sum button... Then, put a button on the form that opens the new report.<br>
<br>
OR...<br>
<br>
Instead of using &quot;All&quot;, use &quot;*&quot;. Then, change the query to say &quot;Like&quot; rather than &quot;=&quot; in the criteria. Don't know what your report looks like so this may or may not help.<br>
<br>
Good Luck!
 
There's a great example of this in Alison Balter's &quot;Mastering Access 97&quot;, page 437. Basically you test in the Report's OnOpen event, then use a Case Statement to make the various sections visible or not visible (example, Me.Detail.Visible=False, Me.GroupFooter1.Visible=False, Me.GroupHeader1 = false, etc.).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top