Solved

Input mask for password entry within Inputbox

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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

706 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

13 Experts available now in Live!

Get 1:1 Help Now