2

A custom ribbon is assigned to an (entire) database in the options for "Current Database" and displays when I open the database with a shortcut like this:

"C:\Program Files (x86)\Microsoft Office\root\Office16\MSACCESS.EXE" D:\d\music.accdb

However, if I close the database and re-open it from the File menu, the custom ribbon is no longer displayed.

If I attempt to load the custom ribbon from VBA, I get an error stating it is already loaded. (The "Client Settings" option is set to show add-in user interface errors, as of course the ribbon would otherwise not display when opened using the first method.)

I specifically re-assigned an individual form from its own custom ribbon to the database-wide custom ribbon to see if this would make the ribbon appear, but it did not when I opened the form. (The form's specific custom ribbon appeared okay before the reassignment.)

I'm using Access 16 as part of Office 365

.

Also, the database is listed twice on recently opened files. I have double-checked again and again: the exact same file is listed twice, with two different timestamps, as the last two files opened. Clicking the icon for one opens the database with the custom ribbon displayed; the other does not. If I instead browse and re-open the closed file from the Windows folder, the custom ribbon is not displayed.

Any ideas what would cause this?

dbmitch
  • 5,361
  • 4
  • 24
  • 38
Dale Thompson
  • 115
  • 1
  • 7
  • 1
    Are you holding down the `Shift` key? And do you have any older unused ribbons in your dropdown list? – dbmitch May 10 '18 at 02:21
  • No, not holding down the shift key, just clicking. There are no unused ribbons. The database was converted from 2003 but I deleted the former commandbars and also deleted the property that caused an error because the primary commandbar no longer existed: CurrentDb.Properties.Delete "StartUpMenuBar" – Dale Thompson May 10 '18 at 12:29
  • As a test, I restored the property "StartupMenuBar" to the database object, setting it to the name of an existing macro, but that did not affect the behavior described above. I also confirmed that the database property "CustomRibbonID" is set to the primary custom ribbon that should be displayed (and is if the database is opened directly rather than from the Access file menu after opening and closing the same database). – Dale Thompson May 10 '18 at 13:17

1 Answers1

1

dbmitch put me in the right direction. I was able to solve this and also eliminate the duplicate listing for the database on the File: Open: Recent menu by deleting all records in the table USysRibbons, performing a compact & repair, then restoring data to USysRibbons.

Dale Thompson
  • 115
  • 1
  • 7