Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Input mask for password entry within Inputbox

Posted on 2004-10-15
3
Medium Priority
?
696 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 600 total points
ID: 12322527
Michaed,

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

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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
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…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
Suggested Courses

886 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