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

Unusual report configuration problem 2

Status
Not open for further replies.

hazelett

Programmer
Jun 29, 2001
15
US
I've got a report printing store locations. At each store there may be one or more machines serviced. My report list them all. What I want to do now is to insert an AVG line only for the stores that have two or more machines. I don't want to print an average() line for the stores with one machine. Any suggestions would be appreciated.
 
hazelett
There may be other ways, but one method would be...

1. Create a text box that averages the number of machines serviced for each store.
2. Make whether or not anything shows in that text box conditional upon the number of machines serviced.

The control source for the text box would be something like...
= IIf (Count([MachinesServiced] > 1, [YourAverageExpression],""))

Obviously, you will have to change the above to match the names of your controls.

Tom
 
hazelett,
Are you wanting to hide a group footer if there is only one record in the group? If so, add a text box to the group footer:
Name: txtCountGroup
Control Source: =Count(*)

Then, add code in the group footer On Format event
Me.GroupFooterSectionName.Visible = Me.txtCountGroup<> 1

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
Tom and Duane,
Thanks for the information. I've read the tips you have given and they both sound very good. I always learn something when I read tek-tips. Your advice is very much appreciated.

Terry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top