By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,483 Members | 3,312 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,483 IT Pros & Developers. It's quick & easy.

How to make *** on inputbox ?

P: 19
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
  9.     stDocName = "Parts"
  10.     DoCmd.OpenForm stDocName, , , stLinkCriteria
  11.        Else
  12.    MsgBox "Incorrect Password"
  13.    End If
  16. Exit_Command19_Click:
  17.     Exit Sub
  19. Err_Command19_Click:
  20.     MsgBox Err.Description
  21.     Resume Exit_Command19_Click
  23. End Sub
Dec 23 '08 #1
Share this Question
Share on Google+
4 Replies

P: 68
Go to Property of that textbox and set the "Inputbox" to Password .It will automatically set "*" for whatever you enter in that textbox.
Dec 23 '08 #2

Expert 100+
P: 1,287
On the Property Sheet for your text box, go to the Data tab and set the Input Mask property to "PASSWORD" without the quotes.
Dec 23 '08 #3

Expert 2.5K+
P: 3,532
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)>
Dec 23 '08 #4

Expert Mod 15k+
P: 31,494
@Mai Le
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.
Dec 23 '08 #5

Post your reply

Sign in to post your reply or Sign up for a free account.