rproactive
Technical User
Hello all. I have struggled with this simple problem for several days & could sure use some advise pointing me in the right direction.
Is it possible to find count of controls (Forms
.Controls.Count) on ALL forms that are closed?
Following code prints all closed forms property name & values. It works fine for open forms (code not shown) but not for closed forms.
I get Runtime error 2456. THe number you used to refer to the form is invalid.
Forms(nn8).Controls.Count
Can I Open all forms in code determine count & then close?? How would I do this- or is there some other way?
Help greatly appreciated.
Is it possible to find count of controls (Forms
Following code prints all closed forms property name & values. It works fine for open forms (code not shown) but not for closed forms.
Code:
'CLOSE forms, count of controls in each open form, the propertiies name & values for each control.
nn8 = 0
For Each obj8 In dbs8.AllForms
mm8 = 0
If obj8.IsLoaded = False Then
Debug.Print "CLOSE Form (" & nn8 & "): " & obj8.Name &_
"count of controls= " & [b]Forms(nn8).Controls.Count[/b]
1020:
If Forms(nn8).Controls.Count - mm8 > 0 Then
Debug.Print name of property (0): “ & Forms
(nn8).Controls(mm8).Properties(0).Name & _
"Value: " & Forms(nn8).Controls(mm8).Properties
(0).Value
mm8 = mm8 + 1
GoTo 1020
End If
nn8 = nn8 + 1
End If
1029:
Next obj8
1030:
Exit Sub
Forms(nn8).Controls.Count
Can I Open all forms in code determine count & then close?? How would I do this- or is there some other way?
Help greatly appreciated.