ACC2000: Input Mask Fails to Allow Correct Insertion of Numeric Literals (208972)



The information in this article applies to:

  • Microsoft Access 2000

This article was previously published under Q208972
Novice: Requires knowledge of the user interface on single-user computers.

This article applies only to a Microsoft Access database (.mdb).

SYMPTOMS

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

CAUSE

This behavior occurs because Microsoft Access determines that the character that 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

To resolve this problem, follow these steps:
  1. Start Microsoft Access; in the Database dialog box, under Objects, click Macros, and then click New.
  2. Create the following macro:

    SendKeys Action
    ----------------
    Keystrokes: {F2}
    Wait: No

  3. Open the form containing the field with the input mask, and then click Design View on the View menu.
  4. Click the field that you want, and if the Properties window is not visible, click Properties on the View menu.
  5. In the On Enter box, specify the macro that you just created.

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

REFERENCES

For more information about numeric literals, click Microsoft Access Help on the Help menu, type use values in expressions in the Office Assistant or the Answer Wizard, and then click Search to view the topic.

For more information about the SendKeys action, click Microsoft Access Help on the Help menu, type sendkeys action in the Office Assistant or the Answer Wizard, and then click Search to view the topic.

Modification Type:MajorLast Reviewed:6/24/2004
Keywords:kbbug kbpending KB208972