Solved

Access VBA

Posted on 2014-01-02
5
489 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
  • 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Microsoft Office Picture Manager is not included in Office 2013. This comes as a shock to users upgrading from earlier versions of Office, such as 2007 and 2010, where Picture Manager was included as a standard application. This article explains how…
No matter the version of Windows you are using, you may have some problems with Windows Search running too slow or possibly not running at all. Before jumping into how you can solve this issue, just know there are many other viable alternative deskt…
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
The viewer will learn how to  create a slide that will launch other presentations in Microsoft PowerPoint. In the finished slide, each item launches a new PowerPoint presentation and when each is finished it automatically comes back to this slide: …

820 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