Dim str As String
if e.Form.Controls("身份证号").Value <> "" Then
str = "([身份证号] Like '*" & e.Form.Controls("身份证号").Value & "*') and "
End If
If e.Sender.Text <> "" Then
Tables("数据查询窗口_Table1").Filter = str & "[姓名] Like '*" & e.Sender.Text & "*'"
else
Dim BB As String
BB = Forms("数据查询窗口").Controls("输入查询姓名").text
If BB <> "" Then
Tables("数据查询窗口_Table1").DataSource = DataTables("人事工资管理")
Tables("数据查询窗口_Table1").SetColVisibleWidth("单位名称|60|姓名|80|身份证号|180")
with e.Form
Dim dst As Table = Tables("人事工资管理")
Dim txb1 As WinForm.TextBox = .Controls("输入查询姓名")
Tables("数据查询窗口_Table1").Filter = "[姓名] Like '*" & txb1.text & "*'"
end with
else
Dim BBB As String
BBB = Forms("数据查询窗口").Controls("身份证号").text
if BBB <> "" Then
Tables("数据查询窗口_Table1").DataSource = DataTables("人事工资管理")
Tables("数据查询窗口_Table1").SetColVisibleWidth("单位名称|60|姓名|80|身份证号|180")
with e.Form
Dim dst As Table = Tables("人事工资管理")
Dim txb1 As WinForm.TextBox = .Controls("身份证号")
Tables("数据查询窗口_Table1").Filter = "[身份证号] Like '*" & txb1.text & "*'"
end with
else
With e.Form
Tables("数据查询窗口_Table1").Filter = "_identify < 0"
End With
end if
end if
end if
Dim str As String
if e.Form.Controls("输入查询姓名").Value <> "" Then
str = "([姓名] Like '*" & e.Form.Controls("输入查询姓名").Value & "*') and "
End If
If e.Sender.Text <> "" Then
Tables("数据查询窗口_Table1").Filter = str & "[身份证号] Like '*" & e.Sender.Text & "*'"
else
Dim BB As String
BB = Forms("数据查询窗口").Controls("身份证号").text
If BB <> "" Then
Tables("数据查询窗口_Table1").DataSource = DataTables("人事工资管理")
Tables("数据查询窗口_Table1").SetColVisibleWidth("单位名称|60|姓名|80|身份证号|180")
else
Dim BBB As String
BBB = Forms("数据查询窗口").Controls("输入查询姓名").text
If BBB <> "" Then
Tables("数据查询窗口_Table1").DataSource = DataTables("人事工资管理")
Tables("数据查询窗口_Table1").SetColVisibleWidth("单位名称|60|姓名|80|身份证号|180")
with e.Form
Dim dst As Table = Tables("人事工资管理")
Dim txb1 As WinForm.TextBox = .Controls("输入查询姓名")
Tables("数据查询窗口_Table1").Filter = "[姓名] Like '*" & txb1.text & "*'"
end with
else
With e.Form
Tables("数据查询窗口_Table1").Filter = "_identify < 0"
End With
end if
end if
end if