我的子表是按照 父表的信息进行加载的,现在就有个问题,我如何通过右上角的后台筛选按钮进行筛选呢,右上角的后台筛选是点不了的。
If MainTable.Name = "XMFP" Then
If DataTables("XMFP").DataRows.Count = 0 Then '如果XMFP表没有数据
DataTables("XMZB").LoadFilter = "BH Is Null" '不加载XMZB
Else
Dim ids As String
For Each dr As DataRow In DataTables("XMFP").DataRows
ids = ids & ",'" & dr("BH") & "'"
Next
ids= ids.Trim(",")
DataTables("XMZB").LoadFilter = "BH In (" & ids & ")"
End If
DataTables("XMZB").Loadtop = ""
DataTables("XMZB").LoadPage = 0
DataTables("XMZB").LoadOrder = "ks Desc"
DataTables("XMZB").Load()
end if