Hide Password

shieriel

Registered User.
Local time
, 00:13
Joined
Feb 25, 2010
Messages
116
Hi to all,

I have a code for opening a password of a form, but the password that i type is not hidden on the dialog box. How can i modify the code such that the password that i type will be shown as asterisk or other character and not the actual values that i typed.
Here is my code:

Private Sub Text65_DblClick(Cancel As Integer)
Dim strPassword As String
strPassword = "My Passowrd"
If InputBox("Please Enter Password to Proceed") = strPassword Then
DoCmd.OpenForm "DataChecking", acFormDS, , , acFormEdit
Else
MsgBox "You are not authorize!!!"
End If
End Sub
 
Hi to all,

I have a code for opening a password of a form, but the password that i type is not hidden on the dialog box. How can i modify the code such that the password that i type will be shown as asterisk or other character and not the actual values that i typed.
Here is my code:

Private Sub Text65_DblClick(Cancel As Integer)
Dim strPassword As String
strPassword = "My Passowrd"
If InputBox("Please Enter Password to Proceed") = strPassword Then
DoCmd.OpenForm "DataChecking", acFormDS, , , acFormEdit
Else
MsgBox "You are not authorize!!!"
End If
End Sub

Hi!
use form instead of InputBox, asterisk can be achieved in Inputbox but its a lenghty work.
 
You can show asterisk in the textbox on the form easily by just setting the text box Input Mask Property to Password.

1 - Create a form, name it 'Password_F'
2 - Create a unbound textbox 'txtPassword' on 'Password_F'
3 - In After_Update Event of 'txtPassword', use your codition to open your 'DataChecking' form

PHP:
Private Sub txtPassword_AfterUpdate()
Dim strPassword As String
strPassword = "My Passowrd"
     If Me.txtPassword.Value  = strPassword Then
         DoCmd.OpenForm "DataChecking", acFormDS, , , acFormEdit
     Else
         MsgBox "You are not authorize!!!"
     End If
End Sub
 
You can show asterisk in the textbox on the form easily by just setting the text box Input Mask Property to Password.

1 - Create a form, name it 'Password_F'
2 - Create a unbound textbox 'txtPassword' on 'Password_F'
3 - In After_Update Event of 'txtPassword', use your codition to open your 'DataChecking' form

PHP:
Private Sub txtPassword_AfterUpdate()
Dim strPassword As String
strPassword = "My Passowrd"
     If Me.txtPassword.Value  = strPassword Then
         DoCmd.OpenForm "DataChecking", acFormDS, , , acFormEdit
     Else
         MsgBox "You are not authorize!!!"
     End If
End Sub


Thank you so much...:D
 
Sir Khalid, the text i entered on the 'txtpassword' still shows the value that i entered and not the asterisk...
 
Shieriel

on your textbox, 'txtpassword' where you type in the password, if you go to properties on 'txtpassword', on the data tab click the InputMask and you can select password function which will then turn any text you type in 'txtpassword' as *****
 
Shieriel

on your textbox, 'txtpassword' where you type in the password, if you go to properties on 'txtpassword', on the data tab click the InputMask and you can select password function which will then turn any text you type in 'txtpassword' as *****

OK, Thank you for the Help...;)
 
Sir Khalid, the text i entered on the 'txtpassword' still shows the value that i entered and not the asterisk...

Did you read my post:
Originally Posted by Khalid_Afridi
You can show asterisk in the textbox on the form easily by just setting the text box Input Mask Property to Password.

Glad you got the answer:rolleyes:
 
Did you read my post:
Originally Posted by Khalid_Afridi
You can show asterisk in the textbox on the form easily by just setting the text box Input Mask Property to Password.

Glad you got the answer:rolleyes:

Hi sir Khalid..Sorry i overlooked that message. It is now working good!:p
 

Users who are viewing this thread

Back
Top Bottom