Sub GetFormsAndControls()
Dim accObj As AccessObject
Dim myControl As Control
Set obj = CurrentProject.AllForms
For Each accObj In obj
Debug.Print accObj.Name & "---Form"
If Not accObj.IsLoaded Then
DoCmd.OpenForm accObj.Name
For Each myControl In Forms(accObj.Name).Controls
Debug.Print Chr(9) & myControl.Name
Next
DoCmd.Close
End If
Next
End Sub
|