jwcolby
jwcolby at colbyconsulting.com
Wed Aug 10 00:59:21 CDT 2011
I find all of these arguments valid however I also use Rick Fisher's Find and Replace which can find unused objects and allow me to delete them. When you start manipulating the query in code then dynamic sql in the control itself seems superior in most cases. John W. Colby www.ColbyConsulting.com On 8/9/2011 9:44 PM, Stuart McLachlan wrote: > On 9 Aug 2011 at 21:04, William Benson (VBACreations. wrote: > >> I think those who are comfortable with a lot of queries in their >> database -- which there is no easy way to tell where that query is >> being used, either in rowsources or in dependent queries ... probably >> work in very stable object environments. >> > > > That's my main concern too. > > If you only use queries in VBA, it is easy to search and tabulate all occurences of a query > name so that you can easily determine all the places it is used. That means that you can > ensure that it is safe to modify/delete queries. > > If however you use them as the source of various controls/forms/reports it is MUCH harder to > determine whether it is safe to modify/delete a query. > > 1. I've deleted this combobox on this form. Can I delete the query that I used to populate it or > is it used by another combobox somewhere on another form/report? > > 2. Users now want this combobox on this form sorted by firstname instead of lastname. > Can I safely change the sort order of the query - Is the same query used in another > combobox on another form? > Do I have to create a new one query for this combobox or is there another query somewhere > already that does this which I can use instead? > If I use a different query, can I safely delete the old one or is it still in use elsewhere? > > 3. There have been a number of changes made to various components of the application. > Which of these queries are still in use somewhere and which should be deleted? > >