Array

klwu

Brainy!!
Local time
Today, 11:58
Joined
Sep 13, 2004
Messages
47
Hey, is there a way to get the full list of tables in the database by using VBA? I am trying to do a backup function, where I want the database to fetch all the table names and put them into an array, to export them one by one to the backup file........hope you guys understands me.....thanks in advance
 
This will get all the names.
Code:
  Dim db                 As DAO.Database
  Dim td                 As DAO.TableDef

  Set db = CurrentDb()

  For Each td In db.TableDefs 
    Debug.Print td.Name
  Next td
 
Hi -

Take a look at this freeware from Peter's Software. It works great!

Bob
 

Users who are viewing this thread

Back
Top Bottom