Report sub report toggle button

Bill Gates

Registered User.
Local time
Today, 11:05
Joined
Jul 30, 2012
Messages
9
I was hoping someone could help me with the correct coding for a show/hide sub report detail.

There is this report page and under each report is a sub report with a little more detail. I was hoping someone could show me how to make the button toggle to show or hide the detail part.

Perhaps I can post a screenshot to help visualize what I mean.
Thank you in advance for any assistance in this project.
 
I couldn't find an edit button. Hope no one minds the double post, otherwise please combine my posts mod.

Attached in a .zip file is a jpg screenshot of the report with subreport details. Maybe with this someone could point me in the right direction for what I'm trying to do.
 

Attachments

I didn't expect to see Bill Gates on here asking questions about his own product ;)

If you want to hide a section, you can use the Visible property of the section.
 
Thanks for the response vbaInet. I understand how that works, but I want to have this toggle button show the sub report of that specific report when clicked. Were you able to see the screen shot I took in the zip file?

This report will be viewed by another person and I want it to be as simple as possible and to look nice in the report section. How can I have the toggle button set the subreport to show when clicked?
 
I think what you mean is you want to be able to expand and collapse it right?
 
Yes! :D That's exactly what I mean. Have I been going about this the wrong way?
 
There's no official way of doing it but there might be a way of coercing it to work. Upload your db with only the relevant bits.
 
I attached the database in a zip file. Thanks once again for your assistance with this!
 

Attachments

I don't understand why you've put the subreport in the Page Footer section but yet expect to have this expand/collapse functionality??
 
Oh, my apologies. I did have it right under the Details, but then moved it to the footer when I went to show someone else what it should look like when it is collapsed.

Someone showed me the VB scripting to make the toggle button turn the visibility on and off, but when the button was toggled it would show the details under every report, and not just that specific one. I unfortunately didn't get the code he showed me.

It was something like If subrptDetail01.visible = true
Then subrptDetail.visible = false
Else something-or-the-other-like-that

And there was another piece of the script that was for the page in general.. I think.

Also we used the same database I uploaded here; and it was irritating having Access ask where the fields were that I had to remove from the Data table. So apologies for the annoying windows that may come up asking where this and that field is linked.

Thanks once again for your assistance; I appreciate your help and expertise.
 
Alright, can you upload a version of how it should actually be.

Making it visible in code will hide the entire subreport. That's not what you want.
 
Could you perhaps send me your email? I could share with you a version of the database which I cannot publicly upload. We can post the results for how it's done back on here.
 
I don't give my private e-mail address unfortunately but what you can do is make the changes to the db you uploaded earlier and upload the revised version. I don't need to see your exact report.
 

Users who are viewing this thread

Back
Top Bottom