Dim tbz As Table = e.Form.Controls("Table1").Table
Dim tbm As Table
try
For i As Integer = 0 To vars(tbz.name & "_MxbJs")-1
Dim bkj As String = "PgTb" & i + 1
tbm = e.Form.Controls(bkj).Table
tbm.Filter = vars(tbz.name & "_MxbFil")(i)
Next
Catch ex As Exception
End Try
其中 vars(tbz.name & "_MxbFil")字典值只有一个
vars(tbz.name & "_MxbFil")(i) 的值 为 1=1 and Guid = '" & tbz.Current("Guid") & "'
但是这样执行 最终显示和 表的过滤值 条件为 1=1 and Guid = '" & tbz.Current("Guid") & "'
tbz.Current("Guid") 并未替换成真正的字段值
但是如果 用 tbm.Filter = “1=1 and Guid = '" & tbz.Current("Guid") & "'” 则可行
dim str as string = “1=1 and Guid = '" & tbz.Current("Guid") & "'”
tbm.Filter = = str 也行
但
dim str as string = vars(tbz.name & "_MxbFil")(i)
tbm.Filter = str 就是不行
tbm.Filter = vars(tbz.name & "_MxbFil")(i) 也是不行
[此贴子已经被作者于2016/3/22 19:15:20编辑过]