Programmatically Traversing an Access Report

I have a very long report. To help combat the length, I've added pseudo-collapse functionality such that when you double click a Group Header, the Group Header below it collapses or expands (really, i'm just toggling it's Visible property). This works all well and good except for one thing, if the header i double click is any header other than the very first record, the header i double click gets thrown out of view because once all of the sub-headers are expanded, it pushes the one i was looking at way down on my form. What can i do about this? i've tried:
ActiveWindow.ScrollRow

Open in new window

but couldn't get it to work. And even if it did work, i'm not sure how i would specify which particular header to scroll to. Is this a lost cause? Am i on the right track? Any help would be greatly appreciated.
Philipe AvelarAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

PatHartmanCommented:
Rather than controlling a large report which can be clunky and slow, why not add a combo or two to the form that runs the report and filter the report first?
Philipe AvelarAuthor Commented:
PatHartman,
Thank you for taking some time to answer my question.
i agree with your advice and i actually already have that in place. The data i'm handling is for a medium sized local company. Even with filters in place, a permanent "expanded" view is just too much for the eyes to comprehend. When collapsed, it displays running totals. When expanded, it breaks down the totals into more exact categories.
PatHartmanCommented:
This is a situation where I would use Report view and create a summary report.  Then I would add drill down buttons which will work ONLY when the report is opened in Report View and add code in them to open a more detailed report.  Depending on how many levels you have, you might want two or three drill downs.  This still allows you to go directly to the detail report if necessary.  It means making several separate reports but it eliminates all the code you are fighting with because all you end up with is OpenReport actions in click events that pass where arguments to the next level down.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Philipe AvelarAuthor Commented:
This definitely seems like the correct way to go. Thank you, PatHartman.
PatHartmanCommented:
You're welcome.  If it makes sense, you could  have multiple buttons on each row.  You just have to make sure that the lower level reports have proper grouping to handle wider selection options.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.