参考代码
If forms.ActiveForm IsNot Nothing Then msgbox(123) For Each c As object In Forms.activeform.controls If Typeof c Is winform.Table Then msgbox(c.Table.DataTable.name) End If NextEnd If