Microsoft KB Archive/147200

= ACC: Null Field's Input Mask Behaves Differently Than Expected =

Article ID: 147200

Article Last Modified on 7/5/2002

-

APPLIES TO


 * Microsoft Access 2.0 Standard Edition
 * Microsoft Access 95 Standard Edition

-



This article was previously published under Q147200



Moderate: Requires basic macro, coding, and interoperability skills.



SYMPTOMS
When you use the TAB key to move to a null field that has an input mask, the input mask does not appear until you begin typing data.



RESOLUTION
If you want the input mask to appear when you use the TAB key to move to a null field, you can create an event procedure that sets the field automatically to Edit mode. This will cause the input mask to appear. The basic steps to do so are as follows:

 Create a form based on your table with the input mask and open it in Design view. Select the form control bound to the input mask field and view its properties.  Set the OnGotFocus property [Event Procedure] to the following procedure by using the Code builder:

     SendKeys "{F2}"  Save and close the module. View the form in Form view. Note that as you press TAB to move to the null field with an input mask, the input mask appears.</ol>

<div class="status_section">

STATUS
This behavior is by design.

<div class="references_section">