ZjiÜt∞nφ existence tabulky v databßzi

Funkce:

Public Function TableExists(DatabaseName As String, 
TableName As String) As Boolean

   'DataBaseName: jmΘno a cesta k souboru 
   'tablename: jmΘno tabulky pro test
   'pokud DB neexistuje, vyvolß chybu

   Dim oDB As Database, td As TableDef

   On Error GoTo errorhandler
   Set oDB = Workspaces(0).OpenDatabase(DatabaseName)
   On Error Resume Next

   Set td = oDB.TableDefs(TableName)
   TableExists = Err.Number = 0
   oDB.Close

   Exit function

errorhandler:

   Err.Raise Err.Number
   Exit Function

End Function

Zp∞t

Autor: The Bozena