Solved

Access VBA

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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

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…
Using Word 2013, I was experiencing some incredible lag when typing.  Here's what worked for me....
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
Learn how to create and modify your own paragraph styles in Microsoft Word. This can be helpful when wanting to make consistently referenced styles throughout a document or template.

815 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now