修改一下doubleClick的代码。
With Tables("统计_table1") If .current IsNot Nothing Dim r As Row =.current Select Case e.col.name Case "销售员" Forms("明细").Show() Tables("明细_table1").Fill("Select * From {业绩表} Where [销售员] = '" & e.Table.Current("销售员") & "'",False) Case Else Forms("明细").show() Dim lm As String =.Cols(.ColSel).caption Tables("明细_table1").Fill("Select * From {业绩表} Where [销售员] = '" & e.Table.Current("销售员") & "' And 产品 = '" & lm & "'",False) End Select End If End With
|