Custom Ribbons (1 Viewer)

Acropolis

Registered User.
Local time
Today, 02:00
Joined
Feb 18, 2013
Messages
182
I have a custom ribbon which loads and work perfectly.

I now need to create some different views for different users with the app, each different type will need a different ribbon.

I don't want to run 3 different version of the app, so want to load the specific ribbon when Access opens.

I have the USysRibbons table setup with the XML and Ribbon Name, and have set the ribbon name is the application to "MyRibbon".

The plan was to change the ribbon name to "MyRibbon" in USysRibbons when the user logs in and load the appropriate ribbon from there.

This kind of works, however the first time the user logs in, it loads the ribbon that was there previously, then changes the name in the table, so the ribbon loads before the code fires. If you quit and restart Access the correct ribbon loads.

When the app first opens it checks to see if there are any updates based on version number, if it's not the right version number is closes, updates and re-opens, so after each update it will need to reset the ribbon, it will then be fine until the next update.

Any idea on how to get over this, and either run the code before the ribbon loads, or change the ribbon without quitting and restarting access?
 

isladogs

MVP / VIP
Local time
Today, 02:00
Joined
Jan 14, 2017
Messages
18,221
As described, this does sound like a property that can only be set to take effect on reopening the db.
However, see if you can manage this as part of your database startup properties

If not, suggest you upload your db so one of us can look at it
 

Acropolis

Registered User.
Local time
Today, 02:00
Joined
Feb 18, 2013
Messages
182
Have found a work around of sorts.

When the DB updates, it now sets a field in the user table "RibbonUpdated" to 0, when DB opens if "Ribbonupdated" = 0 then it sets the ribbon name for the right ribbon in the USysRibbons table, prompts the user DB will close and to re-open straight away.

Not ideal, but as automated as it's gonna get for now. Way too much other stuff to do in it without wasting loads of time trying to figure out something that should be very very easy lol
 

isladogs

MVP / VIP
Local time
Today, 02:00
Joined
Jan 14, 2017
Messages
18,221
Another thought which MAY be worth following up:

1. Have a separate 'splash' utility which checks for updates and used for logging in. If an update is available, this is transferred to the user PC

2. The login status is then stored (possibly by saving it to a temporary text file?) and the main db is opened with the required ribbon.
The 'splash' utility then closes automatically
 
Last edited:

Users who are viewing this thread

Top Bottom