Find Forms With Subforms

S

Steve

Is there a way to programatically determine if a closed form has one or more
subforms and if it does output the source object of the subform control(s)?
I can't open the form and iterate through the form's controls collection
because the form has an open event that opens a dialog form that provides
parameters to the rowsource of the form.

Thanks!

Steve
 
A

Arvin Meyer [MVP]

The open event does not fire if the form is opened in design view, but I
don't think that you expressly need to open it anyway. Iterating through
first the form controls looking for a controlype of acSubform will find the
correct object. Then you must access the form property of the control to
output the source object.
 
Top