Solved

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

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

In the article entitled Working with Objects – Part 1 (http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_4942-Working-with-Objects-Part-1.html), you learned the basics of working with objects, properties, methods, and events. In Work…
Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

759 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

21 Experts available now in Live!

Get 1:1 Help Now