|
|
'Example use: If QueryExists("qryMyQuery") Then CODE ' Code courtesy of UtterAccess Wiki
' http://www.utteraccess.com/wiki/index.php/Category:FunctionLibrary ' Original submission by Hunter57 ' on 7 October 2010 ' ' You are free to use it in any application, ' provided this copyright notice is left unchanged. Public Function QueryExists(strQueryName As String) As Boolean Dim accQry As AccessObject QueryExists = False 'Default Value remains False unless Query is found ' Use the CurrentData.AllQueries Collection to get only saved queries ' Loop through the list of saved queries to get the names For Each accQry In CurrentData.AllQueries If strQueryName = accQry.Name Then QueryExists = True 'We found the Query Exit For ' Exit the Loop End If Next accQry End Function
|
| This page was last modified 09:39, 6 April 2011. This page has been accessed 918 times. Disclaimers |