Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
C# Helper...
 
XML RSS Feed
Follow VBHelper on Twitter
 
 
 
MSDN Visual Basic Community
 
 
 
 
 
TitleSee if a table exists in a DAO database
DescriptionThis example shows how to see if a table exists in a DAO database in Visual Basic 6.
KeywordsDAO, database, table, table exists
CategoriesDatabase
 
The TableExists function loops through the DAO Database object's TableDefs collection looking for the target table.
 
Private Function TableExists(ByVal db As DAO.Database, _
    ByVal table_name As String) As Boolean
Dim td As TableDef

    table_name = UCase$(table_name)
    TableExists = True
    For Each td In db.TableDefs
        If UCase$(td.Name) = table_name Then Exit Function
    Next td
    TableExists = False
End Function
 
 
Copyright © 1997-2010 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated