Solved

CHANGING THE INPUT MASK OF AN INPUTBOX OPTION TO 'PASSWORD'

Posted on 2004-10-03
2
382 Views
Last Modified: 2008-03-04
Hi Experts

I am using an InputBox solution to pop up a window asking the user to enter a supervisor password to allow reprinting of a report. Once the user has entered the successfull password, the Printed value is changed from True to False thereby allowing the report to be printed again.

This is working perfectly. Except that the password is visible to anyone who watches the supervisor enter the password into the InputBox.

Is it possible to change the input mask of the InputBox to be password (i.e. display stars instead of the actual password)?

I am using the code below to run this solution:

***********
Private Sub cmdReprintTicket_Click()

If IsNull(Me.Option) Then
              MsgBox "Enter Ticket Option To Continue", vbCritical, "GBF Management"
        Else
              Dim Message, Title, Password
              Message = "Enter Supervisor Password"
              Title = "Supervisor Action: Reprint Tickets"
              Password = InputBox(Message, Title)

If Password = "superpass" Then

       Me.Printed = False
       MsgBox "You Can Now Reprint This Ticket", vbInformation, "GBF Management"

Else

       MsgBox "Incorrect Supervisor Password", vbCritical, "GBF Management"

End If
End If
End Sub
*******************

Thx In Advance
Stan
0
Comment
Question by:StanKobrin
2 Comments
 
LVL 44

Accepted Solution

by:
Arthur_Wood earned 250 total points
ID: 12212688
as far as I am aware, you cannot change the 'mask' on an InputBox.  Inputr Box is a VERY poor way to request passwords from the user, you would be MUCH better off to create an UserForm to get the user password, and the4n you can set the InputMask on the textbox on thAT FORM.

Also, this variable declaration is not a good idea:

Dim Message, Title, Password

as all three variables are declared a VARIANT - this should be

Dim Message as String, Title as String, Password as String

or

Dim Message as String
Dim Title as String
Dim Password as String

AW
0
 
LVL 27

Expert Comment

by:jjafferr
ID: 12213365
Hi Stan,

I have seen this question poping up a few times, and all the answers are similat to Aurther's,
You cannot Mask an Input box, you should use a Form to do that.

You can make the popup Form modal and look like the "user name" and "password" popup Form too.

jaffer
0

Featured Post

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
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…
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…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

770 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