Jan 24, 2002 #1 aludden Programmer Jan 24, 2002 2 US Hello! I want to list the sql of all my queries in a database, like the documenter does, except I don't like the way documenter does it. Is there an object property I can list/iterate through? Thanks! alex
Hello! I want to list the sql of all my queries in a database, like the documenter does, except I don't like the way documenter does it. Is there an object property I can list/iterate through? Thanks! alex
Jan 24, 2002 Thread starter #2 aludden Programmer Jan 24, 2002 2 US Never mind - I figured it out. Here's my code: Dim obj As AccessObject, dbs As Object Open "Capitation_Queries.txt" For Output As #1 Set dbs = Application.CurrentData For Each obj In dbs.AllQueries Print #1, "Query: " & obj.Name & ":" Print #1, CurrentDb.QueryDefs(obj.Name).SQL Print #1, Print #1, Next obj Thanks! alex Upvote 0 Downvote
Never mind - I figured it out. Here's my code: Dim obj As AccessObject, dbs As Object Open "Capitation_Queries.txt" For Output As #1 Set dbs = Application.CurrentData For Each obj In dbs.AllQueries Print #1, "Query: " & obj.Name & ":" Print #1, CurrentDb.QueryDefs(obj.Name).SQL Print #1, Print #1, Next obj Thanks! alex