How to show Access Database Window to only Admin Users

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • greeni91
    New Member
    • Nov 2009
    • 61

    #1

    How to show Access Database Window to only Admin Users

    Hi There,

    I have created a database that has been implemented in our workshop for over a year now and this is our first problem... actually quite a biggie in my mind.

    One of the users in the workshop has been tinkering with parts of the database and has caused me a lot of hastle. I have tried deleting his account but keep getting errors, I have made sure that deletions are not allowed, I have set his account to the lowest user level and still there is a problem.

    The only solution I could think of is to make the database window, (the one with all the tables, forms, etc.) only appear to the Admin and sgreenshields user accounts. I think the only way he could be tinkering with the database is through the tables that hold the information.

    Any help is appreciated,

    /Sandy
  • NeoPa
    Recognized Expert Moderator MVP
    • Oct 2006
    • 32669

    #2
    Are you currently using Access Security Sandy?

    Comment

    • greeni91
      New Member
      • Nov 2009
      • 61

      #3
      Sorry for the delay in the reply

      Yes I am currently using Access Security. I have created my own security (.ldb) file with indivdual user accounts and passwords to try and prevent this sort of thing from happening. I am starting to consider the possibility that I may have set the security file wrong, but I am sure I would have had problems before this...

      Thanks

      Sandy

      Comment

      • NeoPa
        Recognized Expert Moderator MVP
        • Oct 2006
        • 32669

        #4
        That was some delay. Never mind as it's a forum and it stayed there till you were ready to continue.

        The following code shows your database window.

        Code:
        Call DoCmd.SelectObject(ObjectType:=acForm, InDatabaseWindow:=True)
        If you configure your database not to make the database window visible (From the StartUp window found in the Tools menu) then you can run this code whenever the database is opened by a user you recognise as an Admin.

        The current user is returned by the appropriately named method CurrentUser().

        In the Form_Open() procedure of your default form you can include code to check this user value and, depending on your criteria, run the command or not.

        Comment

        Working...