From: Rich P on
>
Thanks Rich; that did work. I have two qdfs so I have to write two
loops (if I had four: four loops)! I still don't understand why the on
error resume next does
not work!
<

Instead of writing a bunch of loops you could also do this:

Dim QD() As String, qdf As QueryDef, i As Integer
...
Err:
i = 0
For Each qdf in dbs.QueryDefs
Redim Preserve QD(i)
QD(i) = qdf
i = i + 1
Next
For i = 0 To Ubound(QD)
dbs.Querydefs.Delete(QD(i))
Next



Rich

*** Sent via Developersdex http://www.developersdex.com ***