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

Multi user login form questions about greater security

P: 44
I currently have a working multi user login form in access 2007. It automatically redirects people who login to a user specific form e.g. user = staff1 is moved to form staff1 and manager1 is redirected to form manager1. I have used the following code.

Expand|Select|Wrap|Line Numbers
  1. Username.SetFocus
  2. If Username = “Staff1” And Password = “Staff1” Then
  3. MsgBox “Welcome”
  4. DoCmd.Close
  5. DoCmd.Openform “Staff1”
  6. ElseIf Username = “Staff2” And Password = “Staff2” Then
  7. MsgBox “Welcome”
  8. DoCmd.Close
  9. DoCmd.Openform “Staff2”
  10. ElseIf Username = “Manager1” And Password = “Manager1” Then
  11. MsgBox “Welcome, please use caution when making changes”
  12. DoCmd.Close
  13. DoCmd.Openform “Manager1”
  14. Else
  15. MsgBox “Please re-enter username and password”
  16. End If
I have just a few questions.
1. 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.
2. Is there a code that will restrict the number of times you can re-enter the username and password?
3. If there a way of tracking users once they have logged in. I have table which shows data that has been edited and would like to be able to add a field which shows which user edited the data?
4. Is there a way of restricting things like the design view on forms?
Oct 28 '12 #1
Share this Question
Share on Google+
5 Replies

Expert Mod 100+
P: 2,321
1. Yes
2. Yes
3. Yes
4. Yes

But each is a rather large question in it self, and we only allow 1 question per thread to keep matters simple.

Regardless we will need to know whether people besides you need to have access to change objects. Lets make clear immediately that by objects we talk about forms, table design, query design and report design. Most databases are developed by a single developer (or a small group) and used by several people.

If the setup is one where you are the sole developer it makes it a whole lot easier, so I will hold out on answering any of the questions, untill we have heard back from you.

Could you tell us the version of access you are using, and whether the database is split in a backend data storage and a frontend client?
Oct 28 '12 #2

Expert Mod 15k+
P: 31,561
To be absolutely clear, these questions cannot be answered in this thread. They need to be asked separately and clearly each in their own threads (As Smiley has indicated in his post).

I can say that we're happy to anticipate these questions when you do post them, but please remember also to ensure that code is copied directly from your project and you don't type it out freehand or copy it in from a word processor (as appears to be the case here). Also that code of any complexity (more than a couple of lines at most) includes the procedure header and footer. With more experience I'm sure you'll appreciate this for yourself, but it can be critical information that is all too frequently left out of posts.

Feel free to post a link in here when any of your new questions have been posted to ensure that any who are already interested will notice them. I'll be happy to convert a comment into a link if you're not sure how to go about setting up a link. Just post saying you've created a new thread and I'll sort the rest out for you.
Oct 28 '12 #3

P: 44
Thanks, first of all to both of you. As soon as I start the new threads I will post relevent links on here. In answer to your questions.
I am the sole developer.
I am using access 2007
I will not be the only person who needs to make changes.
And I am in the process of splitting the front and back ends to the database. But I do have a question about this as well.
Oct 28 '12 #4

Expert Mod 100+
P: 2,321
Do the other users need to make object design changes or only data changes?
Oct 28 '12 #5

P: 44

here are the relevent links so far:

and in answer to your question some users will only need to perform data entry but others may need to perform design changes as requirements change.
Oct 29 '12 #6

Post your reply

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