Need Help Creating password for a command button on the switchboard

willrans

willrans
Local time
Today, 11:17
Joined
Nov 23, 2004
Messages
7
:confused: 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


End If

Exit Sub


Exit_Command0_Click:
Exit Sub

Err_Command0_Click:
MsgBox Err.Description
Resume Exit_Command0_Click
 
:) Hello willrans!
Look at my solution "DemoPasswordA97".
(MStef alias Štef)
 

Attachments

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.)

hth,

Michael
 
MStef said:
:) Hello willrans!
Look at my solution "DemoPasswordA97".
(MStef alias Štef)

Thanks for the information.... but what do you mean "Look at a field WPass, Default value properties. Look at VBA." I am lost
 
M8KWR said:
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


End If

Exit Sub


Exit_Command0_Click:
Exit Sub

Err_Command0_Click:
MsgBox Err.Description
Resume Exit_Command0_Click

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.
 
;) Hello guest4!
Thanks for this address, I saw a passwor demo, it's OK,
but I think my solution is simpler. In any case thanks for
address.

Willrans!
Only adapt this Demo as you need.

(MStef alias Štef)
 
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.
 
MStef said:
;) Hello guest4!
Thanks for this address, I saw a passwor demo, it's OK,
but I think my solution is simpler. In any case thanks for
address.

Willrans!
Only adapt this Demo as you need.

(MStef alias Štef)

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.
 
Your welcome. Candace is a very talented lady, as you can see. LOL.
 

Users who are viewing this thread

Back
Top Bottom