Stuart McLachlan
stuart at lexacorp.com.pg
Wed Jul 16 17:09:58 CDT 2008
I think you've answered your own question. That's pretty much how I would do it. A couple of wrinkles: I wouldn't save the original in the Tag, (gets a bit tricky with two lists) I'd use a couple of variables that are intialised when the form opens. You will need to parse me.Filter to get the two appropriate filters for the combos. WHne the QBF is applied it would be something like (aircode): strFilter = left$(me.filter, instr(me.filter," AND ")) & ")" SiteName.RowSource = strSiteNameRowSource & " WHERE " & strFilter SiteName.requery strFilter = "(" & mid$(me.filter, instr(me.filter," AND ") + 5 ) SiteNum.ROwSource = strSiteNumRowSource & " WHERE " & strFilter SiteNum.requery (Note the extra braces at the start end of the first part and the start of the second part) :-0 -- Stuart On 16 Jul 2008 at 18:36, Arthur Fuller wrote: > I have two controls on a form that I call "Finders". They are > straightforward dropdowns listing the Site numbers and Site Names. The > problem I'm having is that once I execute the Filter By Form code, the > Finders still list the entire recordset. Suppose that the original recordset > has 50 rows, and you then execute FBF, reducing the set to 10 rows. How can > I refresh the rowsource of the Finders to exclude everything but the 10 rows > isolated by the filter? > > I'm using code by Stan Getz to do the filter operation and it works great. > No issues there. The only question is how to refresh my Finders after an FBF > operation. They start out as "SELECT SiteID, SiteName FROM Sites" and so on. > > > So now the user imposes a filter, and the result is that the filter property > now says "(([SitemCity] LIKE "Toronto*") AND ([SiteUTMnorth] = 0))". So do I > just change the rowsource property of the Finders to concatenate the filter > to the previous rowsource? And then when the user kills the filter, change > the rowsources back to their original values (I could store that in their > Tag properties and then just grab it back from there). > > I hope this explanation was clear enough to give you the picture. > > TIA for any advice. > Arthur > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com