Posted By

CaptainProton on 03/01/10


Tagged

query exists access


Versions (?)

queryExists(String) As Boolean


 / Published in: Visual Basic
 

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

  1. Private Function queryExists(name As String) As Boolean
  2. Dim queryDef As DAO.queryDef
  3.  
  4. For Each queryDef In CurrentDb.QueryDefs
  5. If queryDef.name = name Then
  6. queryExists = True
  7. Exit Function
  8. End If
  9. Next
  10.  
  11. queryExists = False
  12. End Function

Report this snippet  

You need to login to post a comment.