UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Ribbon Trigger, Access 2016    
 
   
mikecj
post Nov 22 2017, 08:54 AM
Post#1



Posts: 50
Joined: 11-November 03



Everyone,

I have a database (circa 2003/2007) with a custom ribbon that I am updating. It has the USysRibbons table with xml code contained therein. The ribbon launches upon opening the database.

My question should be simple. What is the command/setting in Access 2016 that instructs the USYSRibbon table to fire and thus launch the ribbon?

Thanks,

MikeCJ
Go to the top of the page
 
DanielPineault
post Nov 22 2017, 09:57 AM
Post#2


UtterAccess VIP
Posts: 5,450
Joined: 30-June 11



It depends, there are a few places

At the db level
Options->Current Database->Ribbon Name

At the Form/Report Level
Other tab->Ribbon Name

--------------------
Daniel Pineault (2010-2017 Microsoft MVP)
Professional Help: http://www.cardaconsultants.com
Free MS Access Code, Tips, Tricks and Samples: http://www.devhut.net

* Design should never say "Look at me". It should always say "Look at this". -- David Craib
* A user interface is like a joke, if you have to explain it, it's not that good! -- Martin LeBlanc


All code samples, demonstration databases, links,... are provided 'AS IS' and are to be used at your own risk! Take the necessary steps to check, validate ...
Go to the top of the page
 
GroverParkGeorge
post Nov 22 2017, 10:28 AM
Post#3


UA Admin
Posts: 31,195
Joined: 20-June 02
From: Newcastle, WA


Just a note on concepts.

"...instructs the USYSRibbon table to fire....""

Tables do not "fire".

The Access application itself looks to see if you have designated a ribbon--as Daniel has described how to do. If there is a ribbon designated for the database, or for a form or report, Access loads that ribbon using the XML from the USysRibbon table.

Note that you can have multiple ribbons, each one is a record in that table, with its own name.Attached File  tworibbons.png ( 6.31K )Number of downloads: 0

--------------------
Go to the top of the page
 
JonSmith
post Nov 22 2017, 02:09 PM
Post#4



Posts: 3,158
Joined: 19-October 10



Also to clarify, the database cannot be a 2003 one / .mdb
The ribbon was introduced in 2007 and requires the newer format of .accdb
Go to the top of the page
 
GroverParkGeorge
post Nov 22 2017, 02:12 PM
Post#5


UA Admin
Posts: 31,195
Joined: 20-June 02
From: Newcastle, WA


Good catch Jon. The mdb format doesn't support ribbons.

--------------------
Go to the top of the page
 
DanielPineault
post Nov 22 2017, 02:33 PM
Post#6


UtterAccess VIP
Posts: 5,450
Joined: 30-June 11



That's not entirely true. It is Access 2003 and prior that don't support ribbon, but you can in fact (and I have) create the necessary ribbon XML (USys table, VBA code, ...) ... in an mdb and run it in Access 2007+ and the ribbon works just fine. I'd say it is going against the grain, but it works just fine.

Not looking to argue or start a debate though, just passing along some info as I work on such a db as we speak.

--------------------
Daniel Pineault (2010-2017 Microsoft MVP)
Professional Help: http://www.cardaconsultants.com
Free MS Access Code, Tips, Tricks and Samples: http://www.devhut.net

* Design should never say "Look at me". It should always say "Look at this". -- David Craib
* A user interface is like a joke, if you have to explain it, it's not that good! -- Martin LeBlanc


All code samples, demonstration databases, links,... are provided 'AS IS' and are to be used at your own risk! Take the necessary steps to check, validate ...
Go to the top of the page
 
GroverParkGeorge
post Nov 22 2017, 02:41 PM
Post#7


UA Admin
Posts: 31,195
Joined: 20-June 02
From: Newcastle, WA


Oh, cool. I didn't know that Daniel. Thanks.
I'll have to try that.

--------------------
Go to the top of the page
 
JonSmith
post Nov 22 2017, 06:29 PM
Post#8



Posts: 3,158
Joined: 19-October 10



Fair enough Daniel.
Sounds like it would be messy in practice depending on the ribbon configurations but does make it possible it is a .mdb

I'd personally find it really strange for anyone to put a ribbon in a .mdb though.
The file obviously cant be a 2003/2007 file as they different formats.
Go to the top of the page
 
GroverParkGeorge
post Nov 23 2017, 07:36 AM
Post#9


UA Admin
Posts: 31,195
Joined: 20-June 02
From: Newcastle, WA


So far I've not been able to get it to work with an mdb running under A2007.

--------------------
Go to the top of the page
 
DanielPineault
post Nov 23 2017, 08:02 AM
Post#10


UtterAccess VIP
Posts: 5,450
Joined: 30-June 11



That's odd.

I stumbled upon this when I had a client migrating from Access 2003 to 2007 (now running in 2010). I didn't want to immediately change the file format just in case things didn't go smoothly, but I needed to replace the command bars I had created since now they were being tossed into the Add-in tab (less than ideal!). I simply create the usys table and code and it worked. I just validated the FE is an mdb with a 2002-2003 file format. I'll try to strip it down and supply a demo just for illustrative purposes.

--------------------
Daniel Pineault (2010-2017 Microsoft MVP)
Professional Help: http://www.cardaconsultants.com
Free MS Access Code, Tips, Tricks and Samples: http://www.devhut.net

* Design should never say "Look at me". It should always say "Look at this". -- David Craib
* A user interface is like a joke, if you have to explain it, it's not that good! -- Martin LeBlanc


All code samples, demonstration databases, links,... are provided 'AS IS' and are to be used at your own risk! Take the necessary steps to check, validate ...
Go to the top of the page
 
GroverParkGeorge
post Nov 23 2017, 08:09 AM
Post#11


UA Admin
Posts: 31,195
Joined: 20-June 02
From: Newcastle, WA


That would be helpful. Thanks. This is the first attempt I've made with an mdb, so I'll revisit it today and see if I can figure out what might have gone wrong.

--------------------
Go to the top of the page
 
DanielPineault
post Nov 23 2017, 10:09 AM
Post#12


UtterAccess VIP
Posts: 5,450
Joined: 30-June 11



Here's a demo to illustrate things.

Do note that not all the actual ribbon buttons work because it is stripped down and doesn't include all my standard code, but making the buttons do what you want is basic coding once you have the ribbon actually available.

I know it works in 2007, 2010 & 2013 (never tested in 2016 but assume it will continue to work as in prior versions).
Since the USysRibbons table is normally hidden, I always create an Admin query to manage it to avoid always having to go back and forth hiding/unhiding object in the Nav Pain.

<update>Forgot to mention that in the above demo the ribbon is linked to the sample report. So, simply open the report and you'll see a ribbon load.</update>
Attached File(s)
Attached File  MdbRibbonDemo.zip ( 33.02K )Number of downloads: 5
 

--------------------
Daniel Pineault (2010-2017 Microsoft MVP)
Professional Help: http://www.cardaconsultants.com
Free MS Access Code, Tips, Tricks and Samples: http://www.devhut.net

* Design should never say "Look at me". It should always say "Look at this". -- David Craib
* A user interface is like a joke, if you have to explain it, it's not that good! -- Martin LeBlanc


All code samples, demonstration databases, links,... are provided 'AS IS' and are to be used at your own risk! Take the necessary steps to check, validate ...
Go to the top of the page
 
GroverParkGeorge
post Nov 23 2017, 12:33 PM
Post#13


UA Admin
Posts: 31,195
Joined: 20-June 02
From: Newcastle, WA


The report ribbon does work. Thanks.

--------------------
Go to the top of the page
 


Custom Search
RSSSearch   Top   Lo-Fi    12th December 2017 - 01:43 AM