Wed. Jan 15th, 2025
Ms Access Input Mask in Query Form or Report
Ms Access Input Mask in Query Form or Report

The discussion today will explain about Ms Access Input Mask. Input Mask in Ms Access is the feature used to define how users must enter data in specific fields to help maintain consistency and to make your database easier to manage. The examples are the Date/Time field where when you try to input the value, it will show the blank text format in Date (__/__/__ __:__AM/PM).

Ms Access Input Mask-1

Let us add the Input Mask into the BorrowDate field. For creating Input Mask in table, follow this instructions:
1. Go to Design view. Then select the BorrowDate field row.
2. Navigate to Field Properties > General tab. In Input Mask row, click the builder.

Ms Access Input Mask-2

3. In Input Mask Wizard dialog box, select the Input Mask. Click Next.
4. Change the input mask format if needed. Select the placeholder characters and click Finish.

Ms Access Input Mask-3
If it done right, it will show the mask every time you try

 

 

Creating Input Mask in Query:
1. Go to Query Design view. Select the Field to be added with input mask.
2. Open the Property Sheet in Design tab, or press F4.
3. Navigate to Property Sheet > General tab. In Input Mask row, click the builder.
4. Input Mask Wizard dialog box will appear. Repeat step #3 and #4 from instruction for creating Input Mask in table above.

Read Also:  MS Access Validation Rule Lookup Table Examples

Creating Input Mask in Form or Report:
1. Go to the Design view of the Form or Report.
2. Right click the controls that you want to add the Input Mask and select Properties.
3. The Properties Sheet dialog box will appear. Go to Data tab > Input Mask. Click the builder.
4. Input Mask Wizard dialog box will appear. Repeat step #3 and #4 from instruction for creating Input Mask in table above.

Note: Input Mask only can be used for Text and Date/Time data types.
Aside of using the Input Mask Formats provided by Access, you can define your own input mask, as long it still used for said data types. Here are some characters that can be used for self-defined input mask:

Character Explanation
0 (or 9) Enter a digit from 0 to 9.
# Enter a digit, space, plus or minus sign.
? (or A) Enter a letter.
& (or C) Enter either a character or a space.
. , : ; – / Decimal and thousands placeholders, date and time separators. The character you select depends on your Microsoft Windows regional settings.
> Coverts all characters that follow to uppercase.
< Converts all characters that follow to lowercase.
! Causes the input mask to fill from left to right instead of from right to left.
\ Characters immediately following will be displayed literally.
“” Characters enclosed in double quotation marks will be displayed literally
Read Also:  How to Fix MS Access Subscript Out of Range Error

Example:
(000) AAA-AAAA
Return: (206) ABC-DEFG