input mask in VB

recon0302

Registered User.
Local time
Today, 01:43
Joined
Oct 9, 2002
Messages
27
Someone helped me a while back with password protecting a form. It worked great. But I need to know if there is a way to block out the typed-in password (such as **** with input mask). It would be easy if it were in a table but it is not. Anyone able to help me out again?

Marty
 
Not sure if you are using something like my code below but you can NOT alter the format of an input box.

Code:
Private Sub bOpenFormClick_Click()
On Error GoTo Err_bOpenFormClick_Click
    
    Dim strInput As String
    Dim strMsg As String
    
    Beep
    strMsg = "These functions are used only by the special people." & vbCrLf & vbLf & "Please key the Special Form password to allow access."
    strInput = InputBox(Prompt:=strMsg, title:="Special Form Password")
    If strInput = "SpecialPassword" Then 'password is correct
        Beep
        DoCmd.OpenForm "fSpecialForm"
        DoCmd.Close acForm, Me.Name
    Else 'password is incorrect
        Beep
        MsgBox "Incorrect Password!" & vbCrLf & vbLf & "You are not allowed access to the special form.", vbCritical, "Invalid Password"
        Exit Sub
    End If
    
bEdit_Click_Exit:
    Exit Sub
    
Err_bEdit_Click:
    MsgBox Err.Number & " " & Err.Description
    Resume bEdit_Click_Exit
    
Exit_bOpenFormClick_Click:
    Exit Sub
    
Err_bOpenFormClick_Click:
    ErrorMsg Me.Name, "bOpenFormClick_Click", Err.Number, Err.Description
    Resume Exit_bOpenFormClick_Click
    
End Sub
'You can not format an input box.

'HTH
 

Users who are viewing this thread

Back
Top Bottom