Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Have asterisks diplayed in an inputbox

Status
Not open for further replies.

Kocheace

Vendor
Oct 31, 2002
97
US
Does anyone know of a way to display asterisks in an inputbox instead of the actual characters? Any help would be greatly appreciated. IT Professional
 
Not off hand. A non-elegant solution (which is amenable to eligization)

Creating a dialog box with an edit control that has a password input mask.

Declare a global password variable:

Public ThePassword as string

In the 'OnClose' event for the form, enter something like
ThePassword = nz(Me.PasswordControl, "")

To make the form look less cluttered, you should set the following properties:
ScrollBars: neither
RecordSelectors: No
Navigation Buttons: No
Dividing Lines: No
 
Thanks BeeTee but I was trying to avoid creating another form. If all else fails I will have no option but to use your suggestion. Thanks again. IT Professional
 
You can create your own form with TextBox from Microsoft Forms Object Library 2.0. You should first make a reference to it (...\system\fm20.dll, standard VBA library, used by forms in other office applications).
This control has property PasswordChar, where you set the character apperring while writing.
Additionally, you can then use UserForm or access form.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top