Results 1 to 10 of 10
  1. #1
    Join Date
    Sep 2003
    Location
    Toronto, Canada
    Posts
    30

    Unanswered: VBA code to get tables and fields in Access2000

    Hello y'all,
    does anyone have vba code to get the names of tables and fields in a database ? I have about 30 tables and my manager wants the above information.
    Thanks

  2. #2
    Join Date
    Mar 2004
    Location
    Nashville, TN
    Posts
    557
    You have to have the field names with it? Do you need anything other than that? I think I may know how to get all of the table names, but I am not sure on the fields. I know a way to cheat and do it. You could use your relationships layout to display all tables and then expand it till you see all of your fields. That might be worth a try. If you dont want to do that let me know if it is imperative that you have the fieldnames with the table names.

    JS
    Have you ever thought about thinking on purpose?

    Jarvis Stubblefield
    Patriot Designs
    Web/Database Development and Consulting
    The-Patriot.net by Patriot Designs

  3. #3
    Join Date
    Sep 2003
    Location
    Toronto, Canada
    Posts
    30
    Yes, i do need the table names and the fields in the tables.
    Thanks

  4. #4
    Join Date
    Mar 2004
    Location
    Nashville, TN
    Posts
    557
    What do you think about the cheating method... or do you want it more in a list?

    JS
    Have you ever thought about thinking on purpose?

    Jarvis Stubblefield
    Patriot Designs
    Web/Database Development and Consulting
    The-Patriot.net by Patriot Designs

  5. #5
    Join Date
    Sep 2003
    Location
    Toronto, Canada
    Posts
    30
    I would like it listed

    Table name1
    fieldname1
    fieldname2
    fieldname3
    fieldname4

    Table name2
    fieldname1
    fieldname2
    fieldname3
    fieldname4

    Table name3
    fieldname1
    fieldname2
    fieldname3
    fieldname4

    etc

    Thanks

  6. #6
    Join Date
    Mar 2004
    Location
    Nashville, TN
    Posts
    557
    Okay I am searching for a method of doing this. Maybe someone that already knows will replay with the answer before either of us find it.

    JS
    Have you ever thought about thinking on purpose?

    Jarvis Stubblefield
    Patriot Designs
    Web/Database Development and Consulting
    The-Patriot.net by Patriot Designs

  7. #7
    Join Date
    Jun 2004
    Location
    Florida, US
    Posts
    521
    this link might help you for start.
    http://msdn.microsoft.com/library/de...ssdatabase.asp
    ghozy.

  8. #8
    Join Date
    Sep 2003
    Location
    Toronto, Canada
    Posts
    30

    Thumbs up

    Thanks a lot. I decided to use Tools --> Analyses --> Documenter and selected the tables. Funny, I have been using Access for years and never used it .
    Thanks again.

  9. #9
    Join Date
    Jun 2004
    Location
    Florida, US
    Posts
    521
    duh! I didn't read your entire post. so I thought you are looking for it for programming issues. yes, analyse does information reports. sorry .
    ghozy.

  10. #10
    Join Date
    Mar 2004
    Location
    Nashville, TN
    Posts
    557
    Wow okay. I didnt even know that was an option. Thanks I have been using access for about 4 years now and didnt know that.

    JS
    Have you ever thought about thinking on purpose?

    Jarvis Stubblefield
    Patriot Designs
    Web/Database Development and Consulting
    The-Patriot.net by Patriot Designs

Posting Permissions

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