Security Control Ms Access Databases

Hi Experts

Is there a way to hide some of the controls on the ribbon by relating to user rights?

For example  if my user right is just to process sales Accounting then other controls relating to financial accounting must not be visible. I have a ribbon which carries the following:

(1) Sales Accounting
(2) Purchases Accounting
(3) Financial Accounting
(4) Fixed Asset Accounting
(5) Budgeting
(6) Payroll
(7) Inventory

As you can see there is need for segregation of duties above. The above ribbon is not visible at start up form , it is only visible when all the login formalities are done.

Regards

Chris
LVL 3
Hankwembo Christopher,FCCA,FZICA,CIA,MAAT,B.A.ScDirectorAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

John TsioumprisSoftware & Systems EngineerCommented:
I know than you can control enabled/disabled ...for visibility...
Put the following in a module (gEnabled is a global variable)
Option Compare Database
Private m_ribbon As IRibbonUI
Public Sub ToolEnabled(control As IRibbonControl, ByRef enabled)
  Select Case control.Id
    Case "TheIDOf TheControlYou WantToControl"
enabled = gEnabled
    Case Else
    enabled= True
    End Select
End Sub

Public Sub OnMainLoad(Ribbon As IRibbonUI)

  Set m_ribbon = Ribbon
End Sub
Public Property Get MainRibbon() As IRibbonUI
On Error Resume Next
  'global property that re-exposes the ribbon system-wide
  'so consumers can call the IRibbonUI.Invalidate method as required
  Set MainRibbon = m_ribbon
End Property

Open in new window

Then on the form you wish to enable it
 gEnabled = True
        MainRibbon.Invalidate

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Databases

From novice to tech pro — start learning today.