• September 23, 2021


Bring Technology Ideas with you

 Hide and Show Password in Textbox using VBA in Microsoft Access

Mostly, we have seen a trend developing on login forms where a “show password” toggle is introduced to the user. The password field will be transformed from an obfuscated input to a plain-text input by pressing this toggle, where the user will easily see what meaning they are typing.

    User Textbox to design as the image the above then using Checkbox for showing password and other tools as

      By right click on the Checkbox and choose Code Build Event—> Code Builder

        Please rename your Textbox to whatever you want, then copy or write the code below:

        Private Sub chekPass_Click()
        If Me.chekPass.Value = True Then
           Me.txtpassword.InputMask = "Password"
           Me.txtpassword.InputMask = "Clear"
        End If
        End Sub

        On Form_Load event, please set your code to

        Private Sub Form_Load()
        Me.chekPass.Value = False
        End Sub

        Related post