Owned forms only refers to forms that are in the owned forms array which will only inlcude mdi children if they are not currently open. To access mdi children regardless of weather they are open or not you must use the mdichildren property. I use the following code to close all open children of an mdi parent.
When you close each form the next one takes its place as element 0 and gets closed the next time through the loop until there are no more to close at which point the catch statment exits the loop for you.Code:Try Do While True Me.MdiChildren(0).Close() Loop Catch 'this exits the loop when you reach the end of the array End Try




Reply With Quote