Access Password TextBox show pasword

Murray Brown
Murray Brown used Ask the Experts™
on
Hi

I have a Access TextBox with the Input Mask property set to password.
I want to put a button next to it that allows the user to temporarily see the password.
How do I achieve this with VBA?

Thanks
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
President / Owner
Most Valuable Expert 2017
Most Valuable Expert 2012
Commented:
Murray,

Clear the input mask property

Assign it back to ‘password’ to hide it again.

Jim
NoahHardware Tester and Debugger
Commented:
Hi there! :)

I am guessing what you are aiming for is show/hide button? You can try the following as an example. You will want to replace Text1 with the name of the TextBox you are trying to assign this to.

Sub example()

If Text1.InputMask = "Password" Then
    Text1.InputMask = ""
Else
    Text1.InputMask = "Password"
End If

End Sub

Open in new window

Murray BrownASP.net/VBA/VSTO Developer

Author

Commented:
Thanks very much

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial