Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Access VBA

Posted on 2014-01-02
5
Medium Priority
?
511 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 1800 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 200 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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

I was prompted to write this article after the recent World-Wide Ransomware outbreak. For years now, System Administrators around the world have used the excuse of "Waiting a Bit" before applying Security Patch Updates. This type of reasoning to me …
If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

705 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