Results 1 to 2 of 2
  1. #1
    yurako is offline Novice
    Windows 7 Access 2007
    Join Date
    Nov 2009
    Posts
    3

    SQL query to find out whether a table exists

    Hey guys,



    I am writing a C# program that accesses my Access DB.

    What is the SQL query that figures out whether a certain table exists in the DB?

    Thanks

  2. #2
    SoftwareMatters is offline Access VBA Developers
    Windows XP Access 2003
    Join Date
    Mar 2009
    Location
    Dorset
    Posts
    274
    I don't know about doing this in SQL but this is how I would run a check in VBA.

    Set tblDefs = CurrentDb.TableDefs

    For Each tblDef In tblDefs
    If tblDef.Name = "YOURTABLE" Then
    End If
    Next tblDef

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Use query to find and sum data
    By kwelch in forum Queries
    Replies: 3
    Last Post: 11-23-2009, 04:26 AM
  2. Find Records Query
    By sullyman in forum Programming
    Replies: 1
    Last Post: 10-28-2009, 08:49 AM
  3. program find button to search whole table
    By sammer021486 in forum Programming
    Replies: 2
    Last Post: 10-01-2009, 06:36 AM
  4. Create Table If Not Exists
    By jp2access in forum Queries
    Replies: 7
    Last Post: 07-14-2009, 12:49 PM
  5. query to find the highest value in a field
    By jhjarvie in forum Queries
    Replies: 0
    Last Post: 09-02-2008, 02:27 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums