• Filtering of TabStrip Controls (XP/SP1)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Filtering of TabStrip Controls (XP/SP1)

    Author
    Topic
    #401489

    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

    Viewing 1 reply thread
    Author
    Replies
    • #791178

      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, 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.

    • #791179

      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, 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.

    Viewing 1 reply thread
    Reply To: Filtering of TabStrip Controls (XP/SP1)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: