Results 1 to 6 of 6
  1. #1
    buckwheat is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jan 2013
    Posts
    144

    Question Password ### login

    I have this VBA code on a cmd button that would grant access only to certain users. Can someone tell me how to set the display when entering the password to be #### instead of seeing the actual password please?

    Private Sub cmdMasterFiles_Click()
    Dim sPW As String
    sPW = InputBox("Password", "Password")
    If sPW <> "Password01" Then
    MsgBox "Invalid Password!", vbCritical
    Exit Sub


    Else
    DoCmd.OpenForm "frmMasterMenu"
    DoCmd.Close acForm, "Main Menu"
    End If
    End Sub

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,641
    I've heard of a fairly long-winded way of putting an input mask on the InputBox, but I prefer this:

    http://www.baldyweb.com/WrappedForm.htm

    since I can call it from anywhere.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    runbear is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Apr 2011
    Posts
    11
    What I do is set the default value to "#####" and the font to Wingding or some other unreadable font.

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,641
    You can do that in an InputBox? I just use the password input mask on a form textbox.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    buckwheat is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jan 2013
    Posts
    144
    Just now getting back to this segment of the project. I'm at a loss as to how to input suggestions above since I did not create a form, so I'm not sure how I would enter anything into a InputBox. . . when the password input box appears to enter the password, I am not able to do into the design view, so I'm guessing the VBA code needs modified . . .does anyone how how to do this?

    Private Sub cmdMasterFiles_Click()
    Dim sPW As String
    sPW = InputBox("Password", "Password")
    If sPW <> "Alta01" Then
    MsgBox "Invalid Password!", vbCritical
    Exit Sub
    Else
    DoCmd.OpenForm "frmMasterMenu"
    DoCmd.Close acForm, "Main Menu"
    End If
    End Sub

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,641
    Like I said, it's fairly involved. I think this is it:

    http://www.access-programmers.co.uk/...d.php?t=150644

    I just use the little wrapped form.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 08-23-2013, 10:15 AM
  2. Replies: 2
    Last Post: 01-26-2013, 11:38 PM
  3. Replies: 3
    Last Post: 06-22-2012, 04:19 PM
  4. Problem with User Login and Password
    By sk88 in forum Access
    Replies: 3
    Last Post: 12-16-2011, 08:11 AM
  5. Login/Password Code not working
    By eww in forum Programming
    Replies: 3
    Last Post: 09-21-2010, 10:49 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums