1
votes

In an application I have two ribbons: a "General" one which is used for all forms, and a reports-specific one for all reports. From a "Reports Manager" style form, a user can select a report and preview it.

When the report opens, it correctly displays the Reports Ribbon. However, when the report is closed, the Reports Manager form is still showing the Reports Ribbon, instead of the general one.

Once this form is closed, the Ribbon changes back to the general one.

Note that users access this application, as an accde, via Terminal Server.

This incorrect behaviour does NOT happen on a local development machine, so I suspect it is due to a TS 'refresh' issue - which I have noticed in a couple of other circumstances.

Is there anyway to 'force' a refresh of the Ribbon when a report is closed, and the Reports Manager form is therefore displayed?

1

1 Answers

0
votes

I would consider in your startup code grabbing a handle to the main ribbon (that is not re-displaying). Then in the reports on-close event execute a ribbon invalidate command like this:

MyMainRibbon.Invalidate

So you can “force” a ribbon re-plot. This does suggest you always use a accDE, since with a accDB then any un-handed error will ALSO lose the above global var that holds a reference to the ribbon.