If Forms("入库单主窗口").Opened = True Then
Dim r As Row = Tables("insmain").Current
Dim fl As String = "入库单号 = \'" & r("入库单号") & "\'"
r.Load() \'加载父行
LockBaseMainForm() \'锁定主窗口
DataTables("inssub").StopRedraw \'停止绘制订单明细
DataTables("inssub").RemoveFor(fl) \'移除当前订单的订单明细
DataTables("inssub").Appendload(fl) \'追载当前订单的订单明细
DataTables("inssub").ResumeRedraw \'恢复绘制订单明细
UnLockBaseMainForm() \'解锁主窗口
End If