I need some help... I have created a wonderful switchboard but need to add some security to it. There is about 50 users in this DB and I tried to use the Security wizard to set everybody up...It created a huge problem! It did not just secure this database but it secured every database that was on that server since it was created on it. I need to create a password for the command buttons on the switchboard. So that when the button is clicked it prompts for a password before opening a table, query or form. I am clueless on how to do this. I keep running into a dead end. I need some major help! Please! Please! Please!
just use this code behind the command button when pressed, you would need to alter the form that is going to open, and the password that you would have to store in the code.
Hope this helps.
On Error GoTo Err_Command0_Click
Dim stDocName As String
Dim stLinkCriteria As String
Dim Password1
Password1 = InputBox("Please Type the Password", "Password Prompt")
If Password1 = "Test" Then
stDocName = "Main Form"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Else
Another way you can try is make a security folder on your hard drive. This will be prevent users from making changes to a folder and your database. (Setting up a password in a database can easily be erased.)
just use this code behind the command button when pressed, you would need to alter the form that is going to open, and the password that you would have to store in the code.
Hope this helps.
On Error GoTo Err_Command0_Click
Dim stDocName As String
Dim stLinkCriteria As String
Dim Password1
Password1 = InputBox("Please Type the Password", "Password Prompt")
If Password1 = "Test" Then
stDocName = "Main Form"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Else
Thank you for the information... I appreciate it... However I am still confused... When I go to the On Click in the properties on my first button on the switchboard. OnClick=HandleButtonClick(1). If I Click on this one it takes me to our contracts. How do I get further to make sure that the contract buttons are password protected? I have 10 switchboard buttons and each one of those have 8 buttons within them. I want to understand exactly so I can get this correct. Thanks for your help.
Morning Mstref, you are correct on that point, but this was just meant as an alternative, besides like like that three tries and out action that this has.
Thanks MStef
But can you help me understand what exactly to do with this. However I am still confused... When I go to the On Click in the properties on my first button on the switchboard. OnClick=HandleButtonClick(1). If I Click on this one it takes me to our contracts. How do I get further to make sure that the contract buttons are password protected? I have 10 switchboard buttons and each one of those have 8 buttons within them. I want to understand exactly so I can get this correct. Thanks for your help.