Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

List all AccessObjects regardless of object type 2

Status
Not open for further replies.

smandoli9

Programmer
Jun 10, 2002
103
US
I want to loop through all objects in my Access 2003 database. Application.CurrentData offers collections based on object type. Is there any way to loop through them all regardless of type?

The goal is to use the IsDependentUpon method. It requires that the object type be identified, so as I expose each object I need to grab its type.

-------------------------
Dim objDatabase As Object
Dim objObject As AccessObject, objObject2 As AccessObject

Set objDatabase = Application.CurrentData ??
For Each objObject1 in objDatabase.AllObjects
Debug.Print objObject1.Name
For Each objObject2 in objDatabase.AllObjects
If objObject1.IsDependentUpon(ObjectType, objObject2.Name) Then
Debug.Print " " & ObjectType & " " & objObject2.Name
End If
Next
Next
Set objDatabase = Nothing
-------------------------


[purple]_______________________________
[sub]Never confuse movement with action -- E. Hemingway [/sub][/purple]
 
Have you tried to simply query the MSysObjects table. You should be able to get something from that.
 
Oh my. All this time and I didn't know. Thanks and Five Pink Points for you.

[purple]_______________________________
[sub]Never confuse movement with action -- E. Hemingway [/sub][/purple]
 

Thanks ... star ... hadn't seen this interesting site.

[purple]_______________________________
[sub]Never confuse movement with action -- E. Hemingway [/sub][/purple]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top