Cursor control on a data entry form

Posted on 2011-05-04
Last Modified: 2012-05-11
I have a data entry form, I want the cursor just after the default value, I add On Got Focus event but  does not work..
Private Sub DM_Number_GotFocus()
Me![DMNumber].SelStart = 4
Me![DMNumber].SelLength = 2
End Sub
Total data length of the field is 6. therefore allowed to add/enter 3 digits
I am expecting the cursor position 4th field of the text box, DMNumber is the text box name.
Even if it possible to position the cursor after the default value of the text box by property setting of the text box that would be great.
Also, how to make it allowed only capital letter in default, is there any setting in the table design make it possible or property setting of the textbox make it default as capital letter.

Question by:alam747
    1 Comment
    LVL 31

    Accepted Solution

    If this is an Access form, you can use an Input Mask to set the number of characters, whether they can be numbers or letters, or the capitalization.  Open the Input Mask Help topic for more information.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Lync meeting or Lync conferencing is what many organizations would like to deploy to allow them save money. But companies are now giving up for various reasons, one of which is that they cannot join external meetings (non-federated company meetings)…
    Many companies are making the switch from Microsoft to Google Apps ( Use this article to learn more about what Google Apps has to offer and to help if you’re planning on migrating to Google Apps. It is …
    The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
    The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now