By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,191 Members | 1,256 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,191 IT Pros & Developers. It's quick & easy.

Access report with multiple subreports

P: 1
How can I refer to each subreport when one to many exist on a report. Need to add a field from each to a totals by the main from. Seems I can't use the sum function on a grouping break. So thing I can add each from a computed field on the main report, but now sum only includes the first subreport.

Is each subrpeport have an index in the collections that I can refer to?

Jul 20 '07 #1
Share this Question
Share on Google+
1 Reply

Expert 2.5K+
P: 3,072
Hmm, will be easier to generate GroupBy query on a UNION query to total the subform field(s) and show that on the mainform by joining this GroupBy/UNION query with the mainreports query.

Just start with a query with the linking key of the mainreport for each subform like:

select ID, ValueField from tblA
select ID, ValueField from tblB

Now save this and create a GroupBy on the ID and a Sum() on the ValueField.
Finally save this query and JOIN with the mainform's query.

Getting the idea ?

Aug 1 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.