How to make *** on inputbox ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Mai Le
    New Member
    • Jun 2007
    • 19

    #1

    How to make *** on inputbox ?

    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
    Code:
    Private Sub Command19_DblClick(Cancel As Integer)
    On Error GoTo Err_Command19_Click
        Dim Password As String
        Dim stDocName As String
        Dim stLinkCriteria As String
            Password = InputBox("Please enter the password")
        If (Password = "123") Then
    
        stDocName = "Parts"
        DoCmd.OpenForm stDocName, , , stLinkCriteria
           Else
       MsgBox "Incorrect Password"
       End If
    
    
    Exit_Command19_Click:
        Exit Sub
    
    Err_Command19_Click:
        MsgBox Err.Description
        Resume Exit_Command19_Click
        
    End Sub
    Last edited by NeoPa; Dec 23 '08, 11:07 PM. Reason: Please remember to use the [CODE] tags provided
  • jinalpatel
    New Member
    • Mar 2008
    • 68

    #2
    Go to Property of that textbox and set the "Inputbox" to Password .It will automatically set "*" for whatever you enter in that textbox.

    Comment

    • ChipR
      Recognized Expert Top Contributor
      • Jul 2008
      • 1289

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

      Comment

      • missinglinq
        Recognized Expert Specialist
        • Nov 2006
        • 3533

        #4
        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)>

        Comment

        • NeoPa
          Recognized Expert Moderator MVP
          • Oct 2006
          • 32669

          #5
          Originally posted by Mai Le
          Code:
          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.

          Comment

          Working...