The problem is that is a container is inside a container VB no longer considers it a container by these methods. This is my testing for this:
vb Code:
  1. Option Explicit
  2.  
  3. Private Sub Form_Load()
  4. Dim ctl As Object
  5. Dim sStr As String
  6.  
  7.     On Error Resume Next
  8.    
  9.     For Each ctl In Controls
  10.    
  11.         Err.Clear
  12.         sStr = ctl.Container
  13.        
  14.         If Err.Number = 0 And sStr <> "" Then
  15.             sStr = "In a Container - " & sStr & " - " & ctl.Parent.Name
  16.             Debug.Print ctl.Name & " - " & sStr
  17.         Else
  18.             CheckContainer ctl
  19.            
  20.         End If
  21.        
  22.     Next
  23.    
  24. End Sub
  25.  
  26. Private Sub CheckContainer(Container As Object)
  27. Dim ctl As Object
  28. Dim sStr As String
  29. Dim i As Integer
  30.  
  31.  
  32.     On Error Resume Next
  33.    
  34.     Debug.Print vbCrLf & "Container - " & Container.Name
  35.    
  36.     For i = 0 To Container.Controls.Count - 1
  37.    
  38.         Err.Clear
  39.         sStr = Container.Controls(i).Name
  40.        
  41.         If Err.Number = 0 And sStr <> "" Then
  42.             CheckContainer ctl
  43.         Else
  44.             Debug.Print sStr
  45.         End If
  46.     Next
  47.    
  48. End Sub