|
|
'Example usage: If TableExists("tblMyTable") 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 TableExists(strTableName As String) As Boolean Dim accTable As AccessObject TableExists = False 'Default Value remains False if Table is not found ' Use the CurrentData.AllTables Collection to get all Tables ' Loop through the list of Tables to get the names For Each accTable In CurrentData.AllTables If strTableName = accTable.Name Then TableExists = True ' We found the table Exit For ' Exit the Loop End If Next accTable End Function --Hunter57 20:35, 7 October 2010 (EDT)
|
| This page was last modified 09:42, 6 April 2011. This page has been accessed 847 times. Disclaimers |