Results 1 to 3 of 3
  1. #1
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Toronto Canada
    Posts
    920
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Tabbing to Specific Field on Tabbed Form (A2K)

    I have a form with five tabs: Page1; Page2; Page3; Page4; Page5

    The following code on Page1 takes me to Page2

    Private Sub txtUserId_AfterUpdate()
    Page2.SetFocus
    End Sub

    What I'm trying to have happen is not only to go to Page2 but to a specific field called Text54.

    I've checked the Lounge and can't seem to find that particular combination and have also tried some unsuccessful variations on the above. I know it's going to be simple when I see it.

    Would appreciate any help on this,
    Cheers,
    Andy

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Tabbing to Specific Field on Tabbed Form (A2K)

    You only need to set focus to the control, the tab page it is on will automatically be activated:

    Private Sub txtUserId_AfterUpdate()
    Me.Text54.SetFocus
    End Sub

    Note: it is a good idea to give controls meaningful names. If you edit the form or code later, a name such as txtLastName is much easier to handle than Text54.

  3. #3
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Toronto Canada
    Posts
    920
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Tabbing to Specific Field on Tabbed Form (A2K)

    Hans,

    I thought I'd sent this note, but it obviously gotten eaten by my dog. Anyway, thank you, as always you have the answer as you have had all year long. The best wishes for a Happy New Year to you and yours and all the rest of the folks in the Lounge,

    Andy McCraw
    Cheers,
    Andy

Posting Permissions

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