Results 1 to 4 of 4
  1. #1
    5 Star Lounger
    Join Date
    Jan 2004
    Location
    Norfolk, England
    Posts
    744
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Requery autofilter?? (2000)

    Hi,
    I have a combobox that dependant upon its selection returns a value of true or false in a column of cells next to corresponding data.
    Currently I have an autofilter to do the obvious to filter the records based on that selection in the combobox.
    Is there a way to requery the page, so that if the combobox value is changed, the filter will display only those records pertaining to that value. Rather than having to go into the autofilter....

  2. #2
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Requery autofilter?? (2000)

    If the combobox is from FORMS you can create a macro and assign it to the object.

    If it is from the control toolbox, you can add code to the change event.

    The exact code will depend on your sheet. You can use the macro recorder while manually setting the filter to get the code for your example. Or you could provide us details on your setup if you need more help.

    Steve

  3. #3
    5 Star Lounger
    Join Date
    Jan 2004
    Location
    Norfolk, England
    Posts
    744
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Requery autofilter?? (2000)

    I would need it on the change event in on the combobox, as opposed to the other way round.
    Not to sure how to write the coding in excel.

  4. #4
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Requery autofilter?? (2000)

    What is the code that is recorded when you do it manually with the recorder on?

    Steve

Posting Permissions

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