Results 1 to 3 of 3

Thread: FilterOn

  1. #1
    Join Date
    May 2003
    Posts
    144

    Unanswered: FilterOn

    I have a dropdown that allows me to select a product. Once a product is selected, I have the following script to have the form show the product info.

    Me.Requery
    Me.filter = "prodID = " & me.cbx_product
    Me.FilterOn = True

    I did a debug. The requery works and me.cbx_product does contain the correct productID. For whatever reason, the filter works now and then. Am I missing something or overlooking anything? Help. Thanks

    SHK

  2. #2
    Join Date
    Jul 2003
    Location
    Michigan
    Posts
    1,941
    Is it possible that your "drop down" box is returning more products than the recordsource for the form does? If you selected a product that isn't in the base recordset for the form, your filter would bring up an empty record.
    Inspiration Through Fermentation

  3. #3
    Join Date
    Feb 2004
    Posts
    533
    Me.Requery
    Me.filter = "prodID = " & me.cbx_product
    Me.FilterOn = True


    I don't see a need for the 'Requery' prior to setting the filter, unless the form's record source was changed prior to setting the filter string, and filter state.


    ~
    ~

    Bill

Posting Permissions

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