Security Control Ms Access Databases

Hankwembo Christopher,FCCA,FZICA,CIA,MAAT,B.A.Sc
Hankwembo Christopher,FCCA,FZICA,CIA,MAAT,B.A.Sc used Ask the Experts™
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.


Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Software & Systems Engineer
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

Open in new window

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial