Share via


How to: Define User Input Characteristics

You can define the characteristics of the input that users can type in a control using the InputMask property.

For example, suppose you want to limit user input in a text box to numeric values less than 1,000,000 with two decimal places. You can set the InputMask property of the text box to 999,999.99. The comma (,) and the period (.) display in the text box prior to the user entering any values. If the user presses a character key, the character does not display in the text box. As another example, suppose you have a field in a table that accepts Logical data types and you want the user to type "Y" or "N" but not "T" or "F". You can set the InputMask property of the column to "Y".

Hiding User Input Values

When you want to obtain sensitive information from a user, for example, when the user types a password in a text box, you can prevent the information the user types from displaying on the screen.

To hide user input in a text box

  • Set the TextBox PasswordChar property to the asterisk (*) or another generic character.

If you set the PasswordChar property to anything other than an empty string, the Value and Text properties of the text box contain the actual value that the user typed in the text box, but the text box displays a generic character for every key the user pressed.

See Also

Concepts

Controls and Objects Created in Earlier Versions

Reference

Controls for Accepting Input

Accepting Numeric Input in a Given Range

Controls for Allowing Specific Actions

Other Resources

Using Controls