Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2004
    Location
    Huntington, IN
    Posts
    54

    Question Unanswered: Move focus to next in tab order

    How can I move focus to the next control once background processing is complete?

    Based on which field the user is in (and their input), various programming may be triggered. I have the code "remember" the control that the user was in when starting out and return to that control when the code is complete. I would then like it to move focus to the next control in the tab order. I've written the code to be used regardless of where they start, so I cannot do a docmd.gotocontrol "controlname" since it will often differ.

    Essentially, I'm trying to have it process a tab or return key without the user having to. Can I do this?

    Thanks!

  2. #2
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Hrmm, good question.

    I'm sure there's a more elegant way to do it, but you could dump all the control names and thier tab order into an array, then reference the array for the "next" control.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  3. #3
    Join Date
    Sep 2004
    Location
    Tampa, FL
    Posts
    520
    Can the SetFocus function set to a TabStop number as opposed to a control name?
    Darasen

  4. #4
    Join Date
    Mar 2004
    Location
    Huntington, IN
    Posts
    54
    Yes, performing a SetFocus to a tabstop control number was really what I had hoped for. Perhaps someone can help us out on that.

    Thanks Teddy for your idea. I agree - its not elegant, but it would work in a pinch. Very creative. Thanks.

    Matt

Posting Permissions

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