Solved

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

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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
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 …
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 …

695 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