Results 1 to 2 of 2
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Brisbane, Australia
    Thanked 0 Times in 0 Posts

    Filtering of TabStrip Controls (XP/SP1)

    I have a form that lists companies by categories (General, Real Estate, & Clubs). It has three 'pages' to handle each 'category'. In effect, I want to filter the results shown of existing records on each of the 'pages'.

    For example, the Real Estate 'page' should only show those records from the Companies table where the company ="real estate". Is this possible when each company's information on each 'page' is based on the Companies table?

    If so, any suggestions on how to achieve it please?

    Regards, Leigh

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Thanked 31 Times in 31 Posts

    Re: Filtering of TabStrip Controls (XP/SP1)

    If I understand correctly, you should use the tab control only as a means of selecting the category; you shouldn't place controls on the pages of the tab control. (In fact, an option group with toggle buttons or a combo box would serve as well, or better.)
    You can use the On Change event of the tab control to change the filter of the form (or rhe record source.) The value of the tab control corresponds to the zero-based index of the selected tab page: 0 = first page, 1 = second page, etc. If you used the table as in <post#=347445>post 347445</post#>, you could do it as follows:

    Private Sub tabCategories_Change()
    Me.Filter = "Category = " & (Me.tabCategories.Value + 1)
    Me.FilterOn = True
    End Sub

    where tabCategories is the name of the tab control.

    BTW, I notice that you use the name "tabstrip". I hope that you are using a native tab control; a tabstrip is an ActiveX control, not an Access control.

Posting Permissions

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