Solved

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

Posted on 2011-09-03
4
214 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Single Step Macro 4 41
Access 2016 Transfer Spreadsheet Headache... 4 34
default combobox value 12 18
How to Pass Line Number to Error Handler in MZ Tools 7 14
In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

840 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