CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2001
    Location
    Memphis, TN
    Posts
    146

    Let the user pick the Table to access

    I'm writing a real simple database editor for the data entry people here and I'd like to have a combo box list all available tables in a given Database (these are MS Jet .mdb files from MS Access). I think I'm just missing a simple property here, if anyone knows a quick way to do this I'd greatly apreciate it!!!




  2. #2
    Join Date
    Jan 2000
    Location
    Olen, Belgium
    Posts
    2,477

    Re: Let the user pick the Table to access

    I assume you have a database object called db that points to the database. The database has a propertie tabledefs, which is a collection of all tables in the database.

    dim TD as TableDef

    for Each TD in DB.TableDefs
    List1.AddItem TD.Name
    next TD




    Tom Cannaerts
    [email protected]

    Programming today is a race between software engineers striving to build bigger and better idot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook
    Tom Cannaerts
    email: [email protected]
    www.tom.be (dutch site)

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured