Solved

Input mask for password entry within Inputbox

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

821 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