当前位置:跳过导航链接计算机毕业设计首页 : VB计算机毕业设计 : 详细内容

VB居民人口信息管理系统(程序下载)(13)

来源:xiaoniu168.com 作者:本站原创 添加时间:2014-11-04 点击数:36903

计算机毕业设计介绍:

4.10 人口信息查询页面(frmRkxx)
点击人口信息查询里的同音检索、浏览检索、模糊检索中的任一项,弹出人口信息查询页面,左侧显示各查询方式,右侧显示查询结果,以及同音检索、浏览检索、模糊检索、导出和取消按钮。

以下是引用片段:

Private Sub btn添加_Click()
'汉字同音检索算法
Dim i As Long
If Me.Text2.Text = "" Then Exit Sub
Dim strlike As String
For i = 1 To Len(Me.Text2.Text)
    Dim tmprs As New ADODB.Recordset
    Set tmprs = ExecSql("select * from 汉字同音字典 where 同音 =( select 同音 from 汉字同音字典 where 汉字='" & Mid(Me.Text2.Text, i, 1) & "')")
    Dim str As String
    str = ""
    With tmprs
        Do Until .EOF
           str = str & " 人口名称 like '%" & .Fields("汉字").Value & "%' or"
           .MoveNext
        Loop
    End With
    strlike = strlike & str
Next
If Right(strlike, 2) = "or" Then
   strlike = Mid(strlike, 1, Len(strlike) - 2)
End If
Call UpdateList("where " & strlike)
End Sub
Private Sub Combo3_Click()
'设置显示的不同模板的内容
Dim arrColwidth()
    arrColwidth = Array(0, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000)
Dim i As Long
For i = 0 To ddd.Cols - 1
    ddd.ColWidth(i) = 0
Next
Dim tmprs As New ADODB.Recordset
Set tmprs = ExecSql("select * from 模版 where 模版名称='" & Me.Combo3.Text & "' ")

   Dim ii As Long
   With tmprs
       Do Until .EOF
          For i = 0 To ddd.Cols - 1
              If .Fields("表头内容").Value = ddd.TextMatrix(0, i) Then
                 ddd.ColWidth(i) = arrColwidth(i)
                 Exit For
              End If
          Next
          .MoveNext
       Loop
   End With
End Sub
Private Sub UserControl11_Click()
'浏览检索
Dim strsql As String
strsql = " where 1=1 "
If Check1.Value = 1 Then
   strsql = strsql & " and 民族='" & Me.Combo2(8).Text & "'"
End If
If Check2.Value = 1 Then
   strsql = strsql & " and 户口状况='" & Me.Combo2(0).Text & "'"
End If
If Check3.Value = 1 Then
   strsql = strsql & " and 职业='" & Me.Combo2(2).Text & "'"
End If
If Check4.Value = 1 Then
   strsql = strsql & " and 文化程度='" & Me.Combo2(4).Text & "'"
End If
If Check5.Value = 1 Then
   strsql = strsql & " and 经济状况='" & Me.Combo2(6).Text & "'"
End If

〖资料来源:计算机毕业论文 www.xiaoniu168.com

第14页为计算机毕业论文部分......

【联系方式】

【本站信誉】

用心做计算机毕业设计论文网
计算机毕业设计客服
计算机毕业论文客服在线 计算机毕业论文客服在线
计算机毕业论文在线,计算机毕业设计在线