参考
If MainTable.DataTable.HasChanges Then msgbox("请先保存")Else DataTables.UnLoad(MainTable.Name)End If