Results 1 to 3 of 3

Thread: Unselecting All Text In Textbox

  1. #1
    Join Date
    Dec 2009
    Posts
    79

    Unselecting All Text In Textbox

    I have 30 odd textboxes on an Access 2003 form.

    When I tab to each it autoselects all the text (it is highlighted)

    I don't want that. It is too easy to wipe everything out when all you want to do is change the first character or something.

    I know I can turn that off by putting this in the Gotfocus event of each textbox
    Code:
    Textbox1.SelStart = 0
    Textbox1.SelLength = 0
    Is there a property of the texbox that I could use for the same purpose and just set this on the property page?

    Of all the available properties I don't see anything that jumps out at me as being a likely candidate.

  2. #2
    Join Date
    May 2006
    Posts
    407
    SelStart and SelLength are the only way I know of to do that.

  3. #3
    Join Date
    Oct 2006
    Location
    Maitland NSW Australia
    Posts
    275
    You could try doing the following,
    In the Access Options, click on the Advanced menu
    move to Editing section you will see a section Behaviour Entering Field then select Go to Start of the field.

    Note this will do this for all fields in all your databases.
    Allan

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •