Solved

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

Posted on 2011-09-03
4
217 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

624 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