Security to a command button in a form

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • petekikamookow
    New Member
    • Sep 2006
    • 1

    Security to a command button in a form

    Hi Guys.........He lp Please
    I'm trying to add a password to limit access to a command button called"Confiden tial Information"

    Mucho regardo
  • MMcCarthy
    Recognized Expert MVP
    • Aug 2006
    • 14387

    #2
    In the On Click event of the button put the following:

    Code:
     
    Dim pswd As String
    	Set pswd = "anythingyouwant"
    	If pswd = InputBox("Enter Password", "Password Required") Then
    		'Your Code Here
    	Else
    		MsgBox "You don't have permission to access this ares", vbOKOnly
    		Exit Sub
    	End If
    Originally posted by petekikamookow
    Hi Guys.........He lp Please
    I'm trying to add a password to limit access to a command button called"Confiden tial Information"

    Mucho regardo

    Comment

    Working...