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

Password protect a switchboard button on the main switchboard Access 2003

P: 38
Is there anyway to password protect a switchboard button the main switchboard so they can not get to the swtichboard it goes to or any of it's options?
Please help
I have been trying code I found on the internet but it does not seem to be working.
Thanks
Apr 2 '07 #1
Share this Question
Share on Google+
9 Replies


Rabbit
Expert Mod 10K+
P: 12,355
So... basically you want to password protect some of the options on the main form?
Apr 2 '07 #2

P: 38
I want to protect one button on the mainform that goes to another switchboard with other options. Pretty much it's like the Admin Menu which only one person should have access too.

So... basically you want to password protect some of the options on the main form?
Apr 2 '07 #3

Rabbit
Expert Mod 10K+
P: 12,355
Do you have other security measures in place? Or will this be the only security measure you need?
Apr 2 '07 #4

P: 38
This is the only one I will need.

Do you have other security measures in place? Or will this be the only security measure you need?
Apr 2 '07 #5

Rabbit
Expert Mod 10K+
P: 12,355
You'll want to create a mediating form that has a textbox for them to enter a password. Then code will run, possibly on the click of a button that checks this password.

This is unsecure until you convert it to an mde.

Another route is to use the mdw security system built into Access that requires them to log in to access the database. Through code, the form will then only allow them to use the button if they are a member of the Admins group.
Apr 2 '07 #6

P: 38
Do you know what the code is that I would use? I am not very good in the coding department.

You'll want to create a mediating form that has a textbox for them to enter a password. Then code will run, possibly on the click of a button that checks this password.

This is unsecure until you convert it to an mde.

Another route is to use the mdw security system built into Access that requires them to log in to access the database. Through code, the form will then only allow them to use the button if they are a member of the Admins group.
Apr 3 '07 #7

Rabbit
Expert Mod 10K+
P: 12,355
Well basically if you have a textbox called txtPassword and a button called butSubmit:
Expand|Select|Wrap|Line Numbers
  1. Private Sub butSubmit_Click()
  2.    If Me.txtPassword = "Some Password" Then
  3.       ' Password is correct, continue.
  4.    Else
  5.       MsgBox "Login Failed", vbOkOnly
  6.       ' Password is incorrect, do not continue.
  7.    End If
  8. End Sub
Apr 3 '07 #8

P: 3
Hi ok i also just want to password protect a button on the switchboard as i will be th only one adding and deleting data
Apr 11 '07 #9

ADezii
Expert 5K+
P: 8,619
Is there anyway to password protect a switchboard button the main switchboard so they can not get to the swtichboard it goes to or any of it's options?
Please help
I have been trying code I found on the internet but it does not seem to be working.
Thanks
Because the Switchboard is basically a single Form that is dynamically created and modified, it would be very difficult to accomplish what you are requesting. It would, however, be a relatively simple task to bring up an Intermediate Password Entry Form that would prompt the User for a User Name/Password combination and then proceed accordingly. Basically, a Switchboard Button would call a Public Function that would provide this functionality.
Apr 11 '07 #10

Post your reply

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