473,413 Members | 1,802 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,413 software developers and data experts.

List Database Objects

I am using Access 2002.

Is there a technique to produce a report listing all the tables, forms, queries, reports, etc.?
Aug 24 '07 #1
3 6587
Scott Price
1,384 Expert 1GB
Here's a link to Stephen Leban's website that contains an example of how to do this for the tables in a database: http://www.lebans.com/listtablesinmdb.htm

This should point you in the right direction for the other items as well.

Regards,
Scott
Aug 25 '07 #2
ADezii
8,834 Expert 8TB
I am using Access 2002.

Is there a technique to produce a report listing all the tables, forms, queries, reports, etc.?
Here is basic code which will accomplish what you are requesting. Simply call the Function with the appropriate Parameter:
Expand|Select|Wrap|Line Numbers
  1. Public Function GetObjectList(ByVal lngType As AcObjectType) As Variant
  2.     ' Returns an array of object names.
  3.  
  4.     ' Parameters:
  5.     '   intType -- one of acTable, acQuery, acForm,
  6.     '              acReport, acDataAccessPage, acMacro or acModule
  7.  
  8. Dim intI As Integer
  9. Dim strName As String
  10. Dim astrOutput() As String
  11. Dim objCollection As Object
  12. Dim aob As AccessObject
  13.  
  14. Select Case lngType
  15. Case acTable
  16.   Set objCollection = CurrentData.AllTables
  17. Case acQuery
  18.   Set objCollection = CurrentData.AllQueries
  19. Case acForm
  20.   Set objCollection = CurrentProject.AllForms
  21. Case acReport
  22.   Set objCollection = CurrentProject.AllReports
  23. Case acDataAccessPage
  24.   Set objCollection = CurrentProject.AllDataAccessPages
  25. Case acMacro
  26.   Set objCollection = CurrentProject.AllMacros
  27. Case acModule
  28.   Set objCollection = CurrentProject.AllModules
  29. End Select
  30.  
  31. intI = 0
  32.  
  33. For Each aob In objCollection
  34.   strName = aob.Name
  35.   intI = intI + 1
  36.   ReDim Preserve astrOutput(1 To intI)
  37.   astrOutput(intI) = strName
  38. Next aob
  39.  
  40. GetObjectList = astrOutput
  41. End Function
Expand|Select|Wrap|Line Numbers
  1. Private Sub Command6_Click()
  2. 'Given the Object type to enumerate, this Function creates a
  3. 'list of Object names and returns that string. To return just specific Objects:
  4. Dim varList, T As Integer
  5.  
  6. 'one of acTable, acQuery, acForm,
  7. 'acReport, acDataAccessPage, acMacro or acModule
  8.  
  9. varList = GetObjectList(acForm)   'Returns all Forms
  10.  
  11. For T = 1 To UBound(varList)
  12.   Debug.Print varList(T)
  13. Next T
  14. End Sub
OUTPUT:
Expand|Select|Wrap|Line Numbers
  1. subfChild
  2. Switchboard
  3. frmEmployees
  4. frmContinuous
  5. Main Form
Aug 25 '07 #3
JConsulting
603 Expert 512MB
I am using Access 2002.

Is there a technique to produce a report listing all the tables, forms, queries, reports, etc.?

You can also go to Tools/Analyze/Documenter from within access.
J
Aug 25 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

10
by: Der Andere | last post by:
I need to implement a sorted (ordered) list. STL has no sorted list type as far as I know. Is there a (straight) way to implement a sorted list using STL? BTW: The type of items in the list will...
3
by: kyle.tk | last post by:
So I have a central list of python objects that I want to be able to share between different process that are possibly on different computers on the network. Some of the processes will add objects...
1
by: zeke | last post by:
I have an Access database that suddenly opens without the list of objects (You know, Tables, Queries, Forms, Reports . .) at the left of the screen. The objects still exist - for instance, I can...
1
by: matthew.macdonald-wallace | last post by:
Hi all, I'm trying to add functionality to an app written in C# so that a list of people is displayed in a list box on the left hand side and then selected individuals can be added to another...
2
by: G Gerard | last post by:
Hello I am trying to connect to a msaccess database and then create a list of the objects in that database (more specifically the tables) and then create a list of the fields (including the...
0
by: Jeff | last post by:
ASP.NET 2.0 My webpage has a GridView showing rows from a table in the database. All these rows are stored in the session object -what's actually stored is generic list of objects, as this:...
1
by: smoothmunkey | last post by:
I want to make a switchboard with a list box to open objects... but i want the list box to be dynamic (as new queries or forms are created, i want them added). so far i have a combo box that selects...
10
by: AZRebelCowgirl73 | last post by:
This is what I have so far: My program! import java.util.*; import java.lang.*; import java.io.*; import ch06.lists.*; public class UIandDB {
0
by: jappenzeller | last post by:
We're using the HttpRuntime Cache for our objects and we're trying to do the following. We pull lists of objects from the database and put them in cache. We put a reference to the list in...
1
by: krishna81m | last post by:
I am unable to create a list of objects dynamically. I run a SQL query on the database and populate objects of types that I also know aprior. I read the query as a string, run it on the database and...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.