[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1657
  • Last Modified:

Hide/disable certain buttons on custom ribbon bar in access 2007

I have created a custom ribbon bar for my A2007 DB but wanted to know if there was a way to disable and/or hid certain buttons on the ribbon based on a users permission level? I have a table called "tblEmployees" where I can add permission levels but I want to be able to disable certain buttons on the custom ribbon bar. Is this possible? If so, can anyone shed some light on how I would do this?
0
Lawrence Salvucci
Asked:
Lawrence Salvucci
3 Solutions
 
BitsqueezerCommented:
Hi,

this is done using Callback functions which must be in a standard module and declared as Public. You can find all the details about ribbons including demo databases and code snippets here:

http://www.accessribbon.de/en/

Cheers,

Christian
0
 
Lawrence SalvucciInformation Technology ManagerAuthor Commented:
I understand how to enable them and disable them but how do I do it based on a user's permissions?
0
 
Jack LeachCommented:
By using a callback function, you gain access to your entire project via VBA, so you can then check for any active user/permissions from within your code, and return your callback values accordingly.

I forget the attribute name offhand, but the visibility/enabled status will be set according to whatever the callback returns, thus you have the entire project at your disposal for logical handling through the callback.

Cheers,
-jack
0
 
Gustav BrockCIOCommented:
Yes, it is possible, but it will be a lot easier for you if you implement the ribbon class module from Albert D. Kallal:

http://kallal.ca/Ribbon/ribbon.htm

/gustav
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now