Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2002
    Location
    Norway
    Posts
    239

    Question Unanswered: Move focus to another control

    Hi.
    I have a form with several tab pages including a number of subforms.
    How can I move focus to a control on a subform on another tab page ?
    I try to use the following commands:

    ************************************************** ***
    [Forms]![Main]![frm-FollowUP]![frm-FollowUP_Repair].Controls("Number_ID").SetFocus
    and
    [Forms]![Main]![frm-FollowUP]![frm-FollowUP_Repair].[Form]![Number_ID].SetFocus
    ************************************************** ***
    .... but nothing happens.

    The control on the actual tab page should have the focus (i.e. if the focus was original on tab page 1 it shall move to tab page 3)

    The change of focus should be performed by pressing a button on a popup/modal form. (this form should be closed afterwords)

  2. #2
    Join Date
    Jul 2003
    Location
    Netherlands
    Posts
    29
    I think the clue is in your last sentence. Trying to set the focus from a modal form might not work. That modal form has the focus until you close it. I don't think you can set the focus of other controls as long as you're looking at the modal form.
    Bye,

    Jeroen

    A 3D editor project
    www.delgine.com

  3. #3
    Join Date
    Nov 2002
    Location
    Norway
    Posts
    239

    modal/popup

    Nope !

    The tests was done without modal/popup option set.

  4. #4
    Join Date
    Nov 2002
    Location
    Norway
    Posts
    239

    Angry Re: modal/popup

    The problem is solved. It's probably not the most elegant solution, but it function!


    DoCmd.Close
    [Forms]![Main]![frm-FollowUP].SetFocus
    [Forms]![Main]![frm-FollowUP]![frm-FollowUP_Repair].SetFocus
    [Forms]![Main]![frm-FollowUP]![frm-FollowUP_Repair].[Form]![Number_ID].SetFocus


    regards
    my self

Posting Permissions

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