Results 1 to 4 of 4
  1. #1
    markjkubicki's Avatar
    markjkubicki is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Jul 2010
    Location
    Fire Island Pines, NY
    Posts
    496

    set focus selects all of the text

    when I add the code me.txtBoxName.setfocus, the focus does move the the designated textbox, however, in doing so, all of the text in the box is selected.
    (I've not noticed this happening previously, or maybe, that's just it: I never noticed it... never-the-less...)



    Is there a way to just have the curser move to in front of the first character?

    many thanks in advance
    mark

  2. #2
    nicknameoscar is offline Advanced Beginner
    Windows XP Access 2000
    Join Date
    Apr 2011
    Location
    Earlysville, VA
    Posts
    91
    If I am reading your question correctly go click on the Microsoft Office symbol in the extreme upper left corner of the Access user interface. At the bottom of the resulting tab click on the "Access Options" command button. Then click on "Advanced" in the list on the left. In the "Behaviour entering field" option group click "Go to start of field".

  3. #3
    markjkubicki's Avatar
    markjkubicki is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Jul 2010
    Location
    Fire Island Pines, NY
    Posts
    496

    thanks...

    is this an option that I can chage with code?

    (I suspect that others may be having this problem, and it would be good if I could change it in the project when it loads (and then, of course, change it back when closing it)

  4. #4
    nicknameoscar is offline Advanced Beginner
    Windows XP Access 2000
    Join Date
    Apr 2011
    Location
    Earlysville, VA
    Posts
    91
    Check out the "SelStart" property. You may also be interested in "SelLength".

    HorseName below is a textbox and strCharacterCount holds the number of characters typed so far. The code below positioned the cursor after the last character typed. You probably just want to use 0 (or is it 1):

    frm!HorseName.SelStart = strCharacterCount
    Last edited by nicknameoscar; 05-19-2011 at 12:23 PM. Reason: Clarify original remark

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Will not set focus
    By AKQTS in forum Programming
    Replies: 4
    Last Post: 05-04-2011, 06:38 AM
  2. Text Get Focus
    By blueraincoat in forum Forms
    Replies: 4
    Last Post: 03-14-2011, 06:10 PM
  3. Replies: 1
    Last Post: 03-07-2011, 10:48 AM
  4. Grow text box on form with focus
    By Karen H in forum Forms
    Replies: 5
    Last Post: 02-25-2011, 12:03 PM
  5. User selects pictures for report
    By NISMOJim in forum Reports
    Replies: 1
    Last Post: 10-29-2010, 03:06 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums