Solved

Input mask for password entry within Inputbox

Posted on 2004-10-15
3
686 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

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…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

929 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now