Results 1 to 3 of 3
  1. #1
    Silver Lounger GARYPSWANSON's Avatar
    Join Date
    Aug 2001
    Location
    Frederick, Maryland, USA
    Posts
    1,788
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Hiding input in an Inputbox (A2K SR1)

    The following code is launched from a Command Box and requestes a password before opening a new form. Nothing happens if the password is not entered correctly.

    Is there a way to mask the password such that when the user inputs the password the screen shows asterisks for each character typed?


    Private Sub Database_Maintenance_Click()
    On Error GoTo Err_Database_Maintenance_Click

    'InputBox "Enter Password"

    Dim strInput As String, strMsg As String
    Dim pword As String
    pword = "UPDATE"

    strMsg = "Enter Password"
    'strInput = InputBox(strMsg, "Database Maintenance", "Type Password Here")
    strInput = InputBox(Prompt:=strMsg)
    If strInput <> pword Then Exit Sub

    Dim stDocName As String
    Dim stLinkCriteria As String

    stDocName = "Switchboard"
    DoCmd.OpenForm stDocName, , , stLinkCriteria

    Exit_Database_Maintenance_Click:
    Exit Sub
    Regards,

    Gary
    (It's been a while!)

  2. #2
    3 Star Lounger
    Join Date
    Dec 2000
    Location
    USA
    Posts
    379
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Hiding input in an Inputbox (A2K SR1)

    From Dev Ashish site:

    Inputbox and Password Masks

    (Q) How can I assign a Password mask (****) to an InputBox?

    (A) You can't ! Other than calling the InputBox function and getting the values returned by it, you don't have any other control on it. You'll have to create your own form that mimics the InputBox and apply the Password Mask to a textbox.

  3. #3
    Silver Lounger GARYPSWANSON's Avatar
    Join Date
    Aug 2001
    Location
    Frederick, Maryland, USA
    Posts
    1,788
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Re: Hiding input in an Inputbox (A2K SR1)

    Thanks, I thought that it might be so simple I overlooked it....
    Regards,

    Gary
    (It's been a while!)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •