Solved

How divide number on a report by a number on a subreport?

Posted on 2011-09-03
4
207 Views
Last Modified: 2012-05-12
I have a field on a report, "txtSumMoldsMade" which I want to divide by a number on a subreport, "txtCount" and show the result in a field on the main report, "txtAverage"

How?
0
Comment
Question by:SteveL13
  • 2
4 Comments
 
LVL 75
ID: 36478621
You can try this in as the Control Source for txtAverage:

=[txtSumMoldsMade] / (Reports!YourReportName!YourSubReportControlName.Report!txtCount)

Of course, if txtCount can be zero, then you will get #Error ... or if the subreport does not have any records.

mx
0
 
LVL 44

Accepted Solution

by:
GRayL earned 500 total points
ID: 36481356
Actually you can shorten that a bit:

=[txtSumMoldsMade]/[srpName].Report!txtCount

where srpName is the name of the sub-report on the report
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 36484629
<No points wanted>
And you can see here for a way to deal with errors of the sub has no records:

http://www.experts-exchange.com/Microsoft/Development/MS_Access/Access_Coding-Macros/Q_24843132.html

JeffCoachman
0
 
LVL 75
ID: 36497277
Just noting that the syntax I post was correct and will work from anywhere.

mx
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

In the article entitled Working with Objects – Part 1 (http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_4942-Working-with-Objects-Part-1.html), you learned the basics of working with objects, properties, methods, and events. In Work…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

747 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now