不知切换记录是属于什么事件,现在加上这些代码倒是可以实现你要的功能,即鼠标点击主表记录的任意字段处,子表窗体显示的仅为主表选定记录的子表数据: Private Sub 代码_Click() Me.Parent.产品价目表子窗体.Form.Filter = "[产品代码]='" & Me.代码 & "'" Me.Parent.产品价目表子窗体.Form.FilterOn = True End Sub
Private Sub 规格描述_Click() Me.Parent.产品价目表子窗体.Form.Filter = "[产品代码]='" & Me.代码 & "'" Me.Parent.产品价目表子窗体.Form.FilterOn = True End Sub Private Sub 名称_Click() Me.Parent.产品价目表子窗体.Form.Filter = "[产品代码]='" & Me.代码 & "'" Me.Parent.产品价目表子窗体.Form.FilterOn = True End Sub Private Sub 型号_Click() Me.Parent.产品价目表子窗体.Form.Filter = "[产品代码]='" & Me.代码 & "'" Me.Parent.产品价目表子窗体.Form.FilterOn = True End Sub
U9v66riy.rar
(61.59 KB, 下载次数: 164)
|