Solved

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

Posted on 2004-10-03
2
384 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 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

726 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