Results 1 to 4 of 4
  1. #1
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: unbound control synched to active page on tab

    Use the onchange event of the tabbed page.

    Me!txtUnbndPg = Me!TabCtlAddresses.Pages(Me!TabCtlAddresses).Name

    this will return the whole name. from your code it looks like you want just some of it.
    Regards
    John



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

    Re: unbound control synched to active page on tab (a2k)

    Clear the Control Source of the text box, and use the On Change event of the tab control (not the On Click event of the individual pages) to update the text box:

    Private Sub TabCtlAddresses_Change()
    Me.txtUnbndPg = Mid(Me.TabCtlAddresses.Pages(Me.TabCtlAddresses.Va lue).Name, 3)
    End Sub

    To make the text box display a name when the form is opened, you can either set the Default Value property of the text box to the name of the tab page that is active when the form is opened, or you can call TabCtlAddresses_Change in the On Load event of the form:

    Private Sub Form_Load()
    TabCtlAddresses_Change
    End Sub

  3. #3
    3 Star Lounger
    Join Date
    Jul 2002
    Location
    Cedar Falls, Iowa, USA
    Posts
    268
    Thanks
    0
    Thanked 0 Times in 0 Posts

    unbound control synched to active page on tab (a2k)

    How do I sync unbound control on form to the name of the active tab on control tab. Unbound control = txtUnbndPd. Control source = Mid$([TABCTLAddresses].[Pages]([TABCTLAddresses].[Value]).[Name],3)

    E

  4. #4
    3 Star Lounger
    Join Date
    Jul 2002
    Location
    Cedar Falls, Iowa, USA
    Posts
    268
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: unbound control synched to active page on tab (a2k)

    Purrfect!

Posting Permissions

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