Solved

Access VBA

Posted on 2014-01-02
5
500 Views
Last Modified: 2014-01-03
Hello All,

I am looking for a VBA that will loop through all tables in a access database ad output a result report like this:

Table1
FieldX
Field Y
Field Z

Table2
Field F
Field G


tHank you
Rayne
0
Comment
Question by:Rayne
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 

Author Comment

by:Rayne
ID: 39753026
Thank you
0
 

Author Comment

by:Rayne
ID: 39753027
it will only need to display what filed <names> are there within each table...
0
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 450 total points
ID: 39753164
sub ListFieldNames()
dim db as dao.database, td as dao.tabledef, fd as dao.field

set db=currentdb

for each td in db.tabledefs
      if not td.name like "msys*" then
           debug.print  "TABLE - " & td.name
           for each fd in db.tabledefs(td.name).fields
                debug.print fd.name
           next
      end if
next

end sub
0
 
LVL 21

Assisted Solution

by:Boyd (HiTechCoach) Trimmell, Microsoft Access MVP
Boyd (HiTechCoach) Trimmell, Microsoft Access MVP earned 50 total points
ID: 39753176
There is also a built in Documenter that will generate a report will all the data properties. You can select what to print.

On the Ribbon go to the Database Tools Tab.  In the Analyze group select Database Documenter.
0
 

Author Comment

by:Rayne
ID: 39753264
Awesome Guys!!

Thank you for your help :)
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how to import an Outlook PST file to Office 365 using a third party product to avoid Microsoft's Azure command line tool, saving you time.
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question