执行这个代码可以隐藏
Dim bctr = e.Form.Controls("RecordGrid1").BaseControlFor Each r As object In bctr.Rows If r(1).tostring = Nothing Then r.visible = False Else r.visible = True End IfNext
代码你可以放到表A的CurrentChanged事件去。