Question How to stop users from ever seeing database window (1 Viewer)

pbutler

New member
Local time
Today, 10:50
Joined
Aug 27, 2012
Messages
15
Hi All,

I have included some code (borrowed from a kind poster) to disable the access PassKey (holding shift down as you open the database so that the database window appears). It is password protected and it works pretty well for normal users.
However, I have realised that even in this restricted mode you can go to File-Options-Current database and enable Access Keys. This then lets you open the database window by pressing F12.

My question is, is there a way to absolutely stop anyone from ever viewing the database window at all? All my code is password protected, but I still don't want an ICT person fiddling with my tables and queries!

Thanks,
Pino
 

James Dudden

Access VBA Developer
Local time
Today, 10:50
Joined
Aug 11, 2008
Messages
369
Yes, I believe you can hide this by hiding the ribbon though the downside to this is they don't have a ribbon!
 

Frothingslosh

Premier Pale Stale Ale
Local time
Today, 05:50
Joined
Oct 17, 2012
Messages
3,276
You can also create a new ribbon or toolbar that doesn't include those commands, or you can use an AutoKeys macro to disable F11. (If you do that, though, make sure the same function that enables the shift-bypass also enables F11, or create another password-protected option to do the same.) If you're tracking user security, you can even have the AutoKey macro enable F11 for some users, but disable it for others.
 

Simon_MT

Registered User.
Local time
Today, 10:50
Joined
Feb 26, 2007
Messages
2,177
If you have a user file like Employees I have field to Allow Navigation collect on the Main Menu and then:

Code:
    With CodeContextObject
        If .[UserDatabase] = True Then
            Call Database_Window_Reveal
        Else
            Call Database_Window_Hide
        End If
    End With
End Function

Code:
Function Database_Window_Hide()
    With CodeContextObject
        DoCmd.SelectObject acTable, , True
        DoCmd.RunCommand acCmdWindowHide
        DoCmd.ShowToolbar "Ribbon", acToolbarNo 
    End With
End Function
Code:
Function Database_Window_Reveal()
    With CodeContextObject
        DoCmd.SelectObject acTable, , True
        DoCmd.SelectObject acForm, .Name
        DoCmd.ShowToolbar "Ribbon", acToolbarYes
    End With
End Function

Simon
 

pbutler

New member
Local time
Today, 10:50
Joined
Aug 27, 2012
Messages
15
Thanks all of you for your replies. I think I may try a customised ribbon and see what happens. Disabling F11 also sounds good.

Thanks again!
 

Users who are viewing this thread

Top Bottom