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]
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]