Solved

Access VBA

Posted on 2014-01-02
5
484 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
Comment Utility
Thank you
0
 

Author Comment

by:Rayne
Comment Utility
it will only need to display what filed <names> are there within each table...
0
 
LVL 119

Accepted Solution

by:
Rey Obrero earned 450 total points
Comment Utility
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
Comment Utility
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
Comment Utility
Awesome Guys!!

Thank you for your help :)
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
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 …
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

763 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

9 Experts available now in Live!

Get 1:1 Help Now