Results 1 to 6 of 6
  1. #1
    lkmaurik is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2011
    Posts
    10

    DAO Table Names

    Hello,



    Is it possible to get a list of the different table names in a database in a DAO in VBA?

    This list I’m going to use to make a selection list of tables in my database, the selected table will be exported to Excel.

    Thank you in advance,
    Leroy

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Sure, search here on TableDef. You can loop through and get all the names.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    lkmaurik is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2011
    Posts
    10
    Hey,
    Tx for the search term . I found a way. The only problem is that my comb box also the table names: MysysAccessStorrage, MysysAccessXML etc. shows.
    Is there an way to get only the table name I use?
    Thx in advance

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    I don't have Acc2010. Other versions have an option
    Tools-->Options--->System Objects

    Uncheck the System Objects and you should be fine.

  5. #5
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Sure; with whatever method you're using, exclude anything where Left(TableName, 5) = "Mysys"
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  6. #6
    lkmaurik is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2011
    Posts
    10
    Hi Pbaldy,

    Thx for reaction, I already solved it with If...Then left(..
    So almost the same way

    Thx for your replys

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

Similar Threads

  1. Filtering on Field Names from Table
    By reddog1898 in forum Access
    Replies: 3
    Last Post: 05-13-2011, 10:47 AM
  2. Replies: 5
    Last Post: 04-24-2011, 03:14 AM
  3. Get Field names from a table in CurrentDB()
    By e.badin in forum Programming
    Replies: 8
    Last Post: 01-06-2011, 02:17 AM
  4. How to retrieve field names in a table
    By pkstormy in forum Code Repository
    Replies: 0
    Last Post: 12-05-2010, 09:09 PM
  5. Replies: 5
    Last Post: 03-31-2009, 09:16 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