UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Choose Record For Subreports, Access 2016    
 
   
Bokenrosie
post Feb 9 2018, 03:43 PM
Post#1



Posts: 28
Joined: 15-January 18



Good Afternoon You Utterly Intelligent Access Users,

(sorry a bit punch drunk after this crazy week)

I have a report that contains a bunch of sub reports.

I'm launching the report from the form where I can scroll through records but despite being opened on third record it is opening the subreports based on first record.

What do I need to do to fix this?

Thanks.

Go to the top of the page
 
RJD
post Feb 9 2018, 03:48 PM
Post#2


UtterAccess VIP
Posts: 8,360
Joined: 25-October 10
From: Gulf South USA


Hi:

QUOTE
What do I need to do to fix this?

Well, I guess it depends on what you did to make it do that. Could you show us more, like what the command looks like that opens the report, and what query is used to feed the report. Better still, could you post the db (no sensitive data, zipped, 2MB max) with what forms/report you are trying? The answer is usually faster when we can see what is going on ...

HTH
Joe

--------------------
"Each problem that I solved became a rule, which served afterwards to solve other problems."
"You just keep pushing. You just keep pushing. I made every mistake that could be made. But I just kept pushing."

Rene Descartes 1596-1650 (Mathematician and Philosopher)
Go to the top of the page
 
Bokenrosie
post Feb 9 2018, 04:36 PM
Post#3



Posts: 28
Joined: 15-January 18



Thanks for the offer.

So if you open the attached file you will see a form called Decedents.

Listed on the subform are adjustments for the record listed. I'll want to clear up the entry of those later but right now trying to make sure I can get the reporting right.

There is a report called qryAdjustments that shows what should be showing up on the report that you get from clicking "Create Reports" at the top of the Decedent Report.

So right now I'm trying to figure out how to get the "Report 2" that "Create Reports" opens to show the adjustments for the right guy.

Thanks.
This post has been edited by Bokenrosie: Feb 9 2018, 04:36 PM
Attached File(s)
Attached File  Surrogate_Supplemental_Accounting.zip ( 203.24K )Number of downloads: 2
 
Go to the top of the page
 
projecttoday
post Feb 9 2018, 08:25 PM
Post#4


UtterAccess VIP
Posts: 9,699
Joined: 10-February 04
From: South Charleston, WV


You need to fix the report. The main report is based on Decedents. Okay, but this will get all decedents. The sub reports should be based on the sub tables. So you need to 1) get rid of Decedents in the sub reports and 2) link the main report to the sub reports via DecedentsID.

--------------------
Robert Crouser

My company's website
Go to the top of the page
 
RJD
post Feb 9 2018, 10:06 PM
Post#5


UtterAccess VIP
Posts: 8,360
Joined: 25-October 10
From: Gulf South USA


Hi: To expand a bit on what Robert said, if you add the DecedentID to the main report (it was not in the record source, so add it there) and link the subreports by DecedentID, the connections will be there to open the report correctly. See how that was done.

Also look at qryAdjustments. There was no JOIN. See how I added that.

Remove the second DecedentID from the three Schedule Adjustments queries. Being there twice confuses things.

See how this works now ...

HTH
Joe
Attached File(s)
Attached File  Surrogate_Supplemental_Accounting_Rev1.zip ( 102.51K )Number of downloads: 3
 

--------------------
"Each problem that I solved became a rule, which served afterwards to solve other problems."
"You just keep pushing. You just keep pushing. I made every mistake that could be made. But I just kept pushing."

Rene Descartes 1596-1650 (Mathematician and Philosopher)
Go to the top of the page
 
Bokenrosie
post Feb 12 2018, 06:09 PM
Post#6



Posts: 28
Joined: 15-January 18



Thank you so much. I did not know what a join was. I didn't expect to be an expert after the few classes I took on lynda.com but I would have hoped they would cover joins. Maybe I'll go look for a class that includes that.

One other question...On the second record it does not show schedule a-1, I assume this is because it does not have any records but I still need to show it on the report even if there are no adjustments. What do I do there?
Go to the top of the page
 
RJD
post Feb 12 2018, 09:06 PM
Post#7


UtterAccess VIP
Posts: 8,360
Joined: 25-October 10
From: Gulf South USA


QUOTE
One other question...On the second record it does not show schedule a-1, I assume this is because it does not have any records but I still need to show it on the report even if there are no adjustments. What do I do there?

Yes, you are correct - when there are no records, the subreport goes away - and that is the case in one selection here. You can overcome this by creating UNION queries for each subreport. In the second query of the UNION check to see if there are records in the first part - what you have now (using something like a DCount against the underlying data in the first part). If there are no records (count 0), create a dummy record to force the subreport.

HTH
Joe

--------------------
"Each problem that I solved became a rule, which served afterwards to solve other problems."
"You just keep pushing. You just keep pushing. I made every mistake that could be made. But I just kept pushing."

Rene Descartes 1596-1650 (Mathematician and Philosopher)
Go to the top of the page
 


Custom Search
RSSSearch   Top   Lo-Fi    21st June 2018 - 08:47 PM