how to capture the names of all tables of the database in one table?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ahmed222too
    New Member
    • Sep 2007
    • 47

    how to capture the names of all tables of the database in one table?

    how to capture the names of all tables of the database in one table?
  • FishVal
    Recognized Expert Specialist
    • Jun 2007
    • 2656

    #2
    Originally posted by ahmed222too
    how to capture the names of all tables of the database in one table?
    There is no need to capture table names in one table because they are already "captured" to system table [MSysObjects]. To see it check Options>View>Sy stem objects. User-defined tables may be identified by combination of [Flags] and [Type] field values.

    Regards,
    Fish

    Comment

    • missinglinq
      Recognized Expert Specialist
      • Nov 2006
      • 3533

      #3
      Non-system tables can be retrieved using

      Code:
       SELECT [Name] FROM MSysObjects WHERE [Name] Not Like '~*' AND [Name] Not Like 'MSys*' AND [Type]=1 ORDER BY [name];
      as the record source for a form, combobox or listbox.

      Linq ;0)>

      Comment

      • NeoPa
        Recognized Expert Moderator MVP
        • Oct 2006
        • 32636

        #4
        You also have access to a collection which contains all the TableDefs in the database :
        Code:
        CurrentDb.TableDefs

        Comment

        Working...