Tech Support Guy banner
  • Please post in our Community Feedback thread for help with the new forum software! If you are having trouble logging in, please Contact Us for assistance.
Status
Not open for further replies.
1 - 2 of 2 Posts

·
Registered
Joined
·
680 Posts
Discussion Starter · #1 ·
Hi,

I have 3 text boxes on a form, i only want these boxes visible to some users. Perhaps a comand button when pressed asks for a password then shows the text boxes. Is this possible?

Thanks.
 

·
Registered
Joined
·
680 Posts
Discussion Starter · #2 ·
.Hi,

I have actually found the solution. Here it is if you want to have a look.

Dim strPasswd
strPasswd = InputBox("Enter Password", "Restricted Access")
'Check to see if there is any entry made to input box, or if
'cancel button is pressed. If no entry made then exit sub.
If strPasswd = "" Or strPasswd = Empty Then
MsgBox "No Input Provided", vbInformation, "Required Data"
Exit Sub
End If
'If correct password is entered open Employees form
'If incorrect password entered give message and exit sub
If strPasswd = "Haywood" Then
[Funded By]. Visible = True
[Daily Rate].Visible = True
[Weekly Rate].Visible = True
Else
MsgBox "Sorry, you do not have access to this form", _
vbOKOnly, "Important Information"
Exit Sub
 
1 - 2 of 2 Posts
Status
Not open for further replies.
Top