Advanced Ribbon Functionality (1 Viewer)

voyagr12

New member
Local time
Today, 13:25
Joined
Jan 4, 2011
Messages
6
I have a ribbon display when my Access application opens. Call it dbMainTab.

This ribbon has 10 tabs but only tab 1 is displayed when the application opens. The first tab is nothing more than a series of nine buttons that display the other nine tabs individually that then have differing buttons for opening various other forms in the application.

When a button on ribbon tab 1 is pressed, it calls a function "ChangeRibbon". This merely sets the visible property of the correct tab to true and then invalidates the ribbon using the "InvalidateControl". The "ChangeRibbon" function then activates this ribbon tab. In addition, this function removes any of the other 9 tabs being displayed at that moment by setting boolean variables to false. (each tab utilizes getvisible)

This all works great...until I click on one of the buttons on one of the other 9 tabs to open a form. The issue is that when I close that form and come back to the load screen to view my main ribbon again, none of the buttons work on tab 1. Therefore, I can not get the other 9 tabs to load. No errors at all, the code runs as though everything is working, the other tabs just do not display.

Any help would be greatly appreciated. It is almost as though the main ribbon needs to be totally refreshed?

Thanks,
 

voyagr12

New member
Local time
Today, 13:25
Joined
Jan 4, 2011
Messages
6
I believe I may have solved my own problem. Basically my other ribbons I have created for various other forms within my application were calling an onLoad callback function. Therefore, I was defining my global ribbon variable to another ribbon and therefore was unable to do anything with the main ribbon because the global ribbon variable was set to a different ribbon than my main ribbon.

I have had this problem for days, I guess it just takes a post to give the push to figure it out.

Thanks anyways.
 

voyagr12

New member
Local time
Today, 13:25
Joined
Jan 4, 2011
Messages
6
Would there be a way to reset the gobjRibbon global variable to the current ribbon in focus?
 

Ari

Registered User.
Local time
Today, 10:25
Joined
Oct 22, 2011
Messages
139
Hi

Create variables for each ribbon.

gobjribbon1
gobjribbon2
...

gobjribbon1.Invalidate 'changes the Ribbon1
gobjribbon2.Invalidate 'changes the ribbon2
...
 

voyagr12

New member
Local time
Today, 13:25
Joined
Jan 4, 2011
Messages
6
Thanks Ari,

That is actually the direction I am going to go. I wasn't sure if there was a more elegant way of doing this, but the two variables works for me.

Thanks a bunch!
 

Users who are viewing this thread

Top Bottom