KMulvey,
Here's a routine that will count the controls on each form.
It may be useful.
Code:
' ----------------------------------------------------------------
' Procedure Name: GetFormControlCounts
' Purpose: Routine to Count Controls on Each Form in Database and
' output to Immediate window
' Procedure Kind: Sub
' Procedure Access: Public
' Author: Jack
' Date: 29-Jan-20
' ----------------------------------------------------------------
Sub GetFormControlCounts()
10 On Error GoTo GetFormControlCounts_Error
Dim frm As Object
Dim ctl As Control
Dim lngCount As Long
Dim fCount As Long
20 For Each frm In CurrentProject.AllForms
' If frm.name Like "*Text*" Then
' Debug.Print vbCrLf & "Form: " & frm.name
30 lngCount = 0
40 DoCmd.OpenForm frm.name, acDesign, , , , acHidden
50 fCount = fCount + 1
60 For Each ctl In Forms(frm.name).Controls
70 lngCount = lngCount + 1
' Debug.Print lngCount & " " & ctl.name 'for testing
80 Next ctl
90 Debug.Print fCount & " " & frm.name & Space(50 - Len(frm.name)) & " has " & lngCount & " controls"
'End If
100 DoCmd.Close acForm, frm.name
' If fCount > 100 Then Exit Sub 'for testing
110 Next frm
120 Debug.Print vbCrLf & vbTab & "********** GetFormControlCounts Finished ******"
130 On Error GoTo 0
140 Exit Sub
GetFormControlCounts_Error:
150 MsgBox "Error " & Err.Number & " (" & Err.Description & ") in procedure GetFormControlCounts, line " & Erl & "."
End Sub
Sample output
Code:
......
87 frmCompare2TableStructures has 7 controls
88 frmDocVisits has 5 controls
89 frmDogSireDamAssignment has 10 controls
90 frmEATBloatV4 has 118 controls
91 frmMikeUtterAccess has 7 controls
...