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

  • 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?
Lawrence Salvucci
Lawrence Salvucci
3 Solutions

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:



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?
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.

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:



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