By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,504 Members | 2,596 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,504 IT Pros & Developers. It's quick & easy.

Is it possible to prevent users accessing database objects via the navigation pane.

P: 44
Hi,

At the risk of repeating myself in other questions. I have a multi-user login screen which works using the following code:

Expand|Select|Wrap|Line Numbers
  1. Option Compare Database
  2. Private Sub Login_Click()
  3. UserName.SetFocus
  4. If UserName = "Staff1" And Password = "Staff1" Then
  5. MsgBox "Welcome"
  6. DoCmd.Close
  7. DoCmd.OpenForm "Staff1"
  8. ElseIf UserName = "Staff2" And Password = "Staff2" Then
  9. MsgBox "Welcome"
  10. DoCmd.Close
  11. DoCmd.OpenForm "Staff2"
  12. ElseIf UserName = "Manager1" And Password = "Manager1" Then
  13. MsgBox "Welcome, please exercise caution when changing query or table conditions", vbInformation, "CDSignatures"
  14. DoCmd.Close
  15. DoCmd.OpenForm "Manager1"
  16. Else
  17. MsgBox "Please re-enter Username and Password"
  18. End If
  19. End Sub
At the moment this form is little more than a gimmick as anyone entering the program can access all objects in the navigation pane with a single click WITHOUT logging in. Is there a way to prevent users accessing objects in the navigation pane without logging in? I also want prevent users accessing items that aren’t on the relevant forms e.g. the manager1 form gives the user access to all objects in the navigation pane whereas the staff1 and staff2 forms only allow access to different forms.
Oct 29 '12 #1
Share this Question
Share on Google+
4 Replies


zmbd
Expert Mod 5K+
P: 5,287
It is prefered to put the question in the body of the post too.

A couple of ways to do this...
Some depend on which verision of Access you are using.

However, if you go into the current database options there are some things that you can uncheck and one of them is the show navigation pane. You can also disable use special keys thus a simple F11 wont work to unhide the pane. (and I trap these with an autokeys macro too)

There are few VBA commands that can be used too; however, these are dependent on the version.
Oct 30 '12 #2

P: 44
Thanks for your help. I am using access 2007. How do I go about disabling the special keys?
Oct 30 '12 #3

NeoPa
Expert Mod 15k+
P: 31,186
Look in the Startup option from the Options menu on older versions. I expect it's easy enough to find in newer versions but I'm still using 2003 predominantly.
Oct 30 '12 #4

zmbd
Expert Mod 5K+
P: 5,287
Yes, NeoPa is correct...
In V2010 you goto the file ribbon\options\current database: All of these are available there.
I'm sure it's something along the same lines in 2007... we skipped that version.
Oct 30 '12 #5

Post your reply

Sign in to post your reply or Sign up for a free account.