Automating query deletion

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have an Access 2002 db that has thousands of queries that get generated
with a script. After time these queries are nolonger needed. I would like
to delete them but I can only delete on at a time. I am trying to write a
macro using the deleteobject command but it only allows me to choose one
object name.

I can't seem to use a wildcard in the object name which would allow me to
delete all of these objects since the naming convention is similiar.

Can anyone recommend a solution?

Thanks
 
That's a limitation of Macros.

If you used VBA, you could loop through all of the queries and determine
whether or not you wanted to delete the current query.
 
Back
Top