Return to Snippet

Revision: 24430
at March 1, 2010 15:58 by CaptainProton


Initial Code
Private Function queryExists(name As String) As Boolean
  Dim queryDef As DAO.queryDef

  For Each queryDef In CurrentDb.QueryDefs
    If queryDef.name = name Then
      queryExists = True
      Exit Function
    End If
  Next

  queryExists = False
End Function

Initial URL

                                

Initial Description
This method checks whether a query with the given name exists.

Initial Title
queryExists(String) As Boolean

Initial Tags
query

Initial Language
Visual Basic