Dave are you saying the solution is to put a tcl proc which contains the query in a package and then call it from the home page code which isn't currently in any package? Then I could "watch" the file by selecting to watch it from the APM - do I understand correctly?