Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2004
    Posts
    13

    Unanswered: Getting tables of database

    hey,
    Let's say that I write a sub whitch do certain code,and it need table name as parameter---> Sub DoSomething(tableName as string){...}
    In my database I have 5 tables.
    How I can send the name of certain table to the SUB.I want to know the handled object of the database tables...

    thanks...

  2. #2
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1

    Re: Getting tables of database

    Originally posted by WasseemFarhat
    hey,
    Let's say that I write a sub whitch do certain code,and it need table name as parameter---> Sub DoSomething(tableName as string){...}
    In my database I have 5 tables.
    How I can send the name of certain table to the SUB.I want to know the handled object of the database tables...

    thanks...
      Dim tblLoop As TableDef
      
       For Each tblLoop In CurrentDB.TableDefs
         MsgBox (tblLoop.Name)
         ' make whatever you want with that table
       Next

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •