Foxtable(狐表)用户栏目专家坐堂 → 如何实现在姓名查询的结果上,再根据身份证进一步查询!!!谢谢


  共有14253人关注过本帖树形打印复制链接

主题:如何实现在姓名查询的结果上,再根据身份证进一步查询!!!谢谢

帅哥哟,离线,有人找我吗?
雨中的泪
  11楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:六尾狐 帖子:1432 积分:9061 威望:0 精华:0 注册:2009/8/19 8:19:00
  发帖心情 Post By:2010/6/8 22:21:00 [显示全部帖子]

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

 


 回到顶部
帅哥哟,离线,有人找我吗?
雨中的泪
  12楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:六尾狐 帖子:1432 积分:9061 威望:0 精华:0 注册:2009/8/19 8:19:00
  发帖心情 Post By:2010/6/8 22:21:00 [显示全部帖子]

又做了这样的改进,就是代码太乱,不知道有没有更简单的办法,谢谢

 

 


 回到顶部
总数 13 上一页 1 2