Share via

Access Table Field with Input Mask - Initial Cursor position

Anonymous
2019-02-14T22:08:23+00:00

I have a field that must be 4 numbers - leading zeros must be entered (ie. 0123, not 123)

In design view I specified an input mask:   0000:1,#

The issue is that the cursor is initially positioned at the end of the field, after the 4th #.

This requires the user to reposition the cursor to the beginning of the field - quite a nuisance.

Am I doing something incorrectly or is this a design issue?

Thank you

Running Windows 10, Office 365 Home with all updates applied - Version 1901 (Build 11231.20174)

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

5 answers

Sort by: Most helpful
  1. Anonymous
    2019-02-15T05:12:44+00:00

    In Design View, click on the Control and look on the Event tab on the Property Sheet.  Of course, this only applies if you are using a Form in Datasheet View.

    Was this answer helpful?

    0 comments No comments
  2. Duane Hookom 26,825 Reputation points Volunteer Moderator
    2019-02-15T05:00:04+00:00

    A form has a datasheet view.

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2019-02-15T04:40:23+00:00

    Thank you for your reply. 

    I was trying to accomplish this in the datasheet view as well as in a form. 

    In the design view I do not see the event list for a field in the field properties list.

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2019-02-15T03:20:09+00:00

    You could put...

    Me.YourControlName.SelStart = 0

    ...in the On_GotFocus event of the Control.  This will put the cursor at the beginning of the Control.

    EDIT:  I should have mentioned this is normal behavior that can be changed under Options but it does change it everywhere.  The above is on a Control-by-Control basis.

    Was this answer helpful?

    0 comments No comments
  5. Anonymous
    2019-02-14T22:09:27+00:00

    Just noticed a typo.  The Input Mask is 0000;1;#

    Was this answer helpful?

    0 comments No comments