?
Solved

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

Posted on 2004-10-03
2
Medium Priority
?
389 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 44

Accepted Solution

by:
Arthur_Wood earned 1000 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
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…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
Suggested Courses

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