Connecting Tech Pros Worldwide Forums | Help | Site Map

How to make *** on inputbox ?

Newbie
 
Join Date: Jun 2007
Posts: 19
#1: Dec 23 '08
Hello Expert,
I have a code below with inputbox. I would like to have format *** when I type in the box instead of word. So Please help. I did not know.

Thanks alot

Mai Le
Expand|Select|Wrap|Line Numbers
  1. Private Sub Command19_DblClick(Cancel As Integer)
  2. On Error GoTo Err_Command19_Click
  3.     Dim Password As String
  4.     Dim stDocName As String
  5.     Dim stLinkCriteria As String
  6.         Password = InputBox("Please enter the password")
  7.     If (Password = "123") Then
  8.  
  9.     stDocName = "Parts"
  10.     DoCmd.OpenForm stDocName, , , stLinkCriteria
  11.        Else
  12.    MsgBox "Incorrect Password"
  13.    End If
  14.  
  15.  
  16. Exit_Command19_Click:
  17.     Exit Sub
  18.  
  19. Err_Command19_Click:
  20.     MsgBox Err.Description
  21.     Resume Exit_Command19_Click
  22.  
  23. End Sub

Member
 
Join Date: Mar 2008
Location: Indianapolis,IN
Posts: 68
#2: Dec 23 '08

re: How to make *** on inputbox ?


Go to Property of that textbox and set the "Inputbox" to Password .It will automatically set "*" for whatever you enter in that textbox.
Expert
 
Join Date: Jul 2008
Location: Maryland
Posts: 1,176
#3: Dec 23 '08

re: How to make *** on inputbox ?


On the Property Sheet for your text box, go to the Data tab and set the Input Mask property to "PASSWORD" without the quotes.

http://office.microsoft.com/en-us/ac...875501033.aspx
missinglinq's Avatar
Moderator
 
Join Date: Nov 2006
Location: Richmond, Virginia USA
Posts: 3,000
#4: Dec 23 '08

re: How to make *** on inputbox ?


There are no properties for an InputBox, just like there are no properties for a Messagebox! If you want to do this you'll have to "roll your own" by using a small popup form, and then follow the advice you've been given.

Linq ;0)>
NeoPa's Avatar
Administrator
 
Join Date: Oct 2006
Location: London - UK
Posts: 15,730
#5: Dec 23 '08

re: How to make *** on inputbox ?


Quote:

Originally Posted by Mai Le View Post

Expand|Select|Wrap|Line Numbers
  1. Private Sub Command19_DblClick(Cancel As Integer)

While here, I notice you are triggering this code on a DOUBLE-click of a command button. This is possible, but not a good idea as the standard way of triggering a button is with a simple click. Too many people are already confused enough to think that a double-click is required for buttons. This causes many people many problems (as they start things twice), so it is a good idea not to encourage them in their ignorance, or confuse them in any way.
Reply