1、按年月进行关联即可
2、参考:http://www.foxtable.com/webhelp/scr/2222.htm,2个表不能设置为关联表
汇总表,currentchanged事件
Dim t As Table = Tables("明细记录表")
With Tables("汇总表")
If .Current Is Nothing Then
t.Filter = "False"
Else
t.Filter = "年月 = '" & .Current("年月") & "'"
End If
End With
汇总表,datacolchanged事件
Select Case e.DataCol.Name
Case "年月"
Dim t As Table = Tables("明细记录表")
If e.DataRow.Isnull("年月") Then
t.Filter = "False"
Else
t.Filter = "年月 = '" & e.NewValue & "'"
End If
End Select