Solved

Input mask for password entry within Inputbox

Posted on 2004-10-15
3
690 Views
Last Modified: 2008-02-01
Hi all,

The code below is activated from a command button, the user clicks the button and an Input box appears prompting for a password.  However, the password is visible as you type it.  How can I add a mask to the input box (asterisk) to conceal the password being entered?  Thanks

Private Sub cmdCommOrig_Click()
On Error GoTo Err_cmdCommOrig_Click
Dim strInput As String
Dim strMsg As String

strMsg = "This form is used to input new documents." & vbCrLf & vbLf & "Enter the password for access."
strInput = InputBox(Prompt:=strMsg, Title:="Password")
    If strInput = "password" Then ' Password is correct
        DoCmd.OpenForm "frmCommOrig", acFormDS, , , acFormEdit
        'DoCmd.Close acForm, Me.Name
    Else ' Password is incorrect
        MsgBox "Password Incorrect!" & vbCrLf & vbLf & "You are not allowed to input new documents.", vbCritical, "Invalid"
    Exit Sub
End If

Edit_Click_Exit:
Exit Sub

Err_Edit_Click:
    MsgBox Err.Number & " " & Err.Description
Resume Edit_Click_Exit
Exit_cmdCommOrig_Click:
Exit Sub
0
Comment
Question by:MICHAED
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 16

Accepted Solution

by:
Nestorio earned 150 total points
ID: 12322527
Michaed,

Use a textbox in a form instead the inputbox and define its input mask property as password.
0
 
LVL 50

Expert Comment

by:Steve Bink
ID: 12322530
You can't.  The InputBox is in a built-in library, and does not contain that functionality.  In order to create a password input box, you would create a custom form with associated code to handle the input.  It is not that difficult, and we can surely help you along with it.
0
 

Author Comment

by:MICHAED
ID: 12322565
Ok...I didn't realize I couldn't modify the InputBox. It looks as though I'll have to complete this via a Textbox.

Thanks,
Ed
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question