📄 form4.frm
字号:
VERSION 5.00
Begin VB.Form Form4
Caption = "Form4"
ClientHeight = 3735
ClientLeft = 60
ClientTop = 450
ClientWidth = 7950
LinkTopic = "Form4"
ScaleHeight = 3735
ScaleWidth = 7950
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command2
Caption = "返回主页"
Height = 375
Left = 6720
TabIndex = 15
Top = 3120
Width = 975
End
Begin VB.Frame Frame1
Caption = "查询模块"
Height = 2895
Left = 120
TabIndex = 0
Top = 120
Width = 7695
Begin VB.TextBox Text5
BackColor = &H00FFFFC0&
Height = 375
Left = 4920
TabIndex = 13
Top = 1800
Width = 1815
End
Begin VB.TextBox Text4
BackColor = &H00FFFFC0&
Height = 375
Left = 1200
TabIndex = 11
Top = 1800
Width = 2175
End
Begin VB.TextBox Text3
BackColor = &H00FFFFC0&
Height = 375
Left = 1680
TabIndex = 9
Top = 1320
Width = 2535
End
Begin VB.TextBox Text2
BackColor = &H00FFFFC0&
Height = 375
Left = 3960
TabIndex = 7
Top = 840
Width = 1215
End
Begin VB.TextBox Text1
BackColor = &H00FFFFC0&
Height = 375
Left = 840
TabIndex = 5
Top = 840
Width = 1455
End
Begin VB.CommandButton Command1
Caption = "查询"
Height = 375
Left = 6480
TabIndex = 3
Top = 240
Width = 1095
End
Begin VB.ComboBox Combo1
Height = 300
Left = 1080
TabIndex = 1
Top = 240
Width = 1815
End
Begin VB.Image Image1
Height = 735
Left = 960
Top = 2160
Width = 1815
End
Begin VB.Label Label7
Caption = "照片:"
Height = 255
Left = 120
TabIndex = 14
Top = 2400
Width = 735
End
Begin VB.Label Label6
Caption = "民族:"
Height = 255
Left = 4200
TabIndex = 12
Top = 1920
Width = 615
End
Begin VB.Label Label5
Caption = "出生日期:"
Height = 255
Left = 120
TabIndex = 10
Top = 1920
Width = 975
End
Begin VB.Label Label4
Caption = "公民身份号码: "
Height = 255
Left = 120
TabIndex = 8
Top = 1440
Width = 1335
End
Begin VB.Label Label3
Caption = "性别"
Height = 255
Left = 3120
TabIndex = 6
Top = 960
Width = 615
End
Begin VB.Line Line1
BorderColor = &H00FF0000&
X1 = 120
X2 = 7560
Y1 = 720
Y2 = 720
End
Begin VB.Label Label2
Caption = "姓名:"
Height = 255
Left = 120
TabIndex = 4
Top = 960
Width = 735
End
Begin VB.Label Label1
Caption = "人员编号:"
Height = 255
Left = 120
TabIndex = 2
Top = 360
Width = 975
End
End
End
Attribute VB_Name = "Form4"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim cn As New ADODB.Connection
Dim rs As New ADODB.Recordset
Private Sub Command1_Click()
rs.Open "select * from MemInf where RYBH=" + Combo1.Text + " ", cn, adOpenKeyset, adLockOptimistic
Text1 = rs.Fields(1)
Text3 = rs.Fields(3)
Text4 = rs.Fields(4)
Text5 = rs.Fields(5)
rs.Close
rs.Open "select DIC_TEXT from MemSex where DIC_CODE=(select XB from MemInf where RYBH=" + Combo1.Text + ")", cn, adOpenKeyset, adLockOptimistic
Text2.Text = rs.Fields("DIC_TEXT")
rs.Close
rs.Open "select DIC_TEXT from MemNtn where DIC_CODE=(select MZ from MemInf where RYBH=" + Combo1.Text + ")", cn, adOpenKeyset, adLockBatchOptimistic
Text5.Text = rs.Fields("DIC_TEXT")
rs.Close
End Sub
Private Sub Command2_Click()
Form4.Visible = False
Form2.Show
End Sub
Private Sub Form_Load()
cn.Open "Test", "sa"
rs.Open "select RYBH from MemInf", cn, adOpenKeyset, adLockOptimistic
Do While Not rs.EOF
Combo1.AddItem (rs.Fields(0))
rs.MoveNext
Loop
rs.Close
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -