1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Solved: Access 2003 VBA

Discussion in 'Business Applications' started by karlhaywood, Dec 30, 2010.

Thread Status:
Not open for further replies.
  1. karlhaywood

    karlhaywood Account Closed Thread Starter

    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.
     
  2. karlhaywood

    karlhaywood Account Closed Thread Starter

    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
     
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 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/971543

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice