Solved: Access 2003 VBA

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

karlhaywood

Thread Starter
Account Closed
Joined
Jan 17, 2010
Messages
680
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.
 

karlhaywood

Thread Starter
Account Closed
Joined
Jan 17, 2010
Messages
680
.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
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Members online

Top