Access Form mask Password Text Box

This Access tutorial explains how to mask text in Password Text Box and ComboBox Control with asterisk in Access Form.

You may also want to read:

Access user login Form and verify password

Access Form Password Text Box

When you design a Access Form which requires users to input confidential information, such as log in password, you may want to mask the password with asterisk. You can apply data masking for ComboBox and Text Box.

password_textbox

In Access, you can mask the password in two ways.

Change Input Mask in Control Property

Go to the Design View of the target Text Box.

In the Property page of Text Box, select Data page.

In the “Input Mask” field, type Password

password_textbox_02

Change InputMask Property in VBA

To change InputMask in VBA,  type the following code.

Me.TbBadge.InputMask = "Password"

Change InputMask Property in other formats

Similar to Excel Custom Format, InputMask Property has a specific set of characters for formatting.

Character Description
0 Digit (0 to 9, entry required, plus [+] and minus [–] signs not allowed).
9 Digit or space (entry not required, plus and minus signs not allowed).
# Digit or space (entry not required; spaces are displayed as blanks while in Edit mode, but blanks are removed when data is saved; plus and minus signs allowed).
L Letter (A to Z, entry required).
? Letter (A to Z, entry optional).
A Letter or digit (entry required).
a Letter or digit (entry optional).
& Any character or a space (entry required).
C Any character or a space (entry optional).
. , : ; – / Decimal placeholder and thousand, date, and time separators. (The actual character used depends on the settings in the Regional Settings Properties dialog box in Windows Control Panel).
< Causes all characters to be converted to lowercase.
> Causes all characters to be converted to uppercase.
! Causes the input mask to display from right to left, rather than from left to right. Characters typed into the mask always fill it from left to right. You can include the exclamation point anywhere in the input mask.
\ Causes the character that follows to be displayed as the literal character (for example, \A is displayed as just A).

Since setting other Input Mask formats is out of scope of this article, you can click the below link for details

https://technet.microsoft.com/en-us/windows/aa196136%28v=office.11%29?f=255&MSPPError=-2147217396

2 thoughts on “Access Form mask Password Text Box

  1. I tried to use textbox input mask property for password login
    but it returns asterisks to the code in place real password characters

Leave a Reply

Your email address will not be published. Required fields are marked *