Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Deleting multiple queries all at once....

Status
Not open for further replies.

MikeDNova

Programmer
Jul 3, 2002
86
0
0
US
Hey guys,

Is there a way to specify a wild card of some sort, either in a macro or something that will allow me to delete all queries starting with a qry.....

let me know if anyone has had any experience with this...

thanks
mike
 
Hi

Using DAO you could interate through the querydefs collection and delete depending on the name

'Air code'
Dim Db as Database
Dim qdf as Querydef
Dim i as Integer
'
Set db = CurrentDb()
i = db.querydefs.count
for j = 0 to i
if Left(db.querydefs(i).Name,3) = "qry" Then
db.querydefs(i).delete
End if
Next i Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top