Microsoft KB Archive/119706

= ACC: Input Mask with Numeric Literals Inserts Incorrectly =

Article ID: 119706

Article Last Modified on 1/19/2007

-

APPLIES TO


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

-



This article was previously published under Q119706



Novice: Requires knowledge of the user interface on single-user computers.



SYMPTOMS
If you create an input mask that contains a numeric literal for a field, and then enter a number that is part of that numeric literal in the field, the number is not entered in the field unless you type it twice.



CAUSE
Microsoft Access determines that the character you type matches the literal that you defined in the input mask, and moves you to the next non-literal position in the input mask.



RESOLUTION
In the form containing the field with the input mask, specify the following macro in the field's OnEnter property setting:

  SendKeys Action ---

Keystrokes: {F2} Wait: No



STATUS
Microsoft has confirmed this to be a problem in Microsoft Access versions 2.0, 7.0, and 97.



Steps to Reproduce Problem

 * 1) Create a new table with one field with a Number data type.
 * 2) Set the field's InputMask property to:

"19"## (make sure to include the quotation marks)
 * 1) Save the table, and then view it in Datasheet view.
 * 2) Type 89 in the field. Note that the field displays "1989," as is expected.
 * 3) In the next cell, type 94 . Note that "19 4" is displayed in the cell. The 9 you entered is not displayed.

