I have (hopefully) an easy question for you all. I'm running Access '03 and have created a pile of VBA code to create a form and some queries related to each control in the form. (Basically, it uses structured naming conventions to create a form with a bunch of combo boxes that allow the user to easily add and remove controls... anyway--)
I am using the statement
Expand|Select|Wrap|Line Numbers
- With CurrentDb
- .QueryDefs.Delete ("qryName")
- Set qrydef = .CreateQueryDef("qryName", strSQL)
- .Close
- End With
Is there a function that can tell me if a query with a specific name exists that I can use in an "If" statement? Ideally, it would be something like:
Expand|Select|Wrap|Line Numbers
- If qryExists("qryName") Then
- .QueryDefs.Delete("qryName")
- End If
Thanks!