📄 frm_jtcyjinfo.frm
字号:
Top = 1530
Width = 1290
End
Begin VB.TextBox Text1
Height = 300
Left = 1215
TabIndex = 9
Top = 300
Width = 1305
End
Begin VB.Label Label21
AutoSize = -1 'True
Caption = "籍贯:"
Height = 180
Left = 6240
TabIndex = 45
Top = 345
Width = 540
End
Begin VB.Label Label22
AutoSize = -1 'True
Caption = "国籍:"
Height = 180
Left = 4605
TabIndex = 36
Top = 345
Width = 540
End
Begin VB.Label Label19
AutoSize = -1 'True
Caption = "职务:"
Height = 180
Left = 4620
TabIndex = 34
Top = 750
Width = 540
End
Begin VB.Label Label18
AutoSize = -1 'True
Caption = "与户主关系:"
Height = 180
Left = 5475
TabIndex = 32
Top = 1140
Width = 1080
End
Begin VB.Label Label17
AutoSize = -1 'True
Caption = "文化程度:"
Height = 180
Left = 5520
TabIndex = 30
Top = 1530
Width = 900
End
Begin VB.Label Label16
AutoSize = -1 'True
Caption = "工作单位:"
Height = 180
Left = 5505
TabIndex = 28
Top = 1965
Width = 900
End
Begin VB.Label Label15
AutoSize = -1 'True
Caption = "家庭住址:"
Height = 180
Left = 3165
TabIndex = 21
Top = 2760
Width = 900
End
Begin VB.Label Label14
AutoSize = -1 'True
Caption = "暂住证号:"
Height = 180
Left = 3165
TabIndex = 20
Top = 2400
Width = 900
End
Begin VB.Label Label13
AutoSize = -1 'True
Caption = "家庭电话:"
Height = 180
Left = 2625
TabIndex = 19
Top = 2010
Width = 900
End
Begin VB.Label Label12
AutoSize = -1 'True
Caption = "单位电话:"
Height = 180
Left = 2610
TabIndex = 18
Top = 1605
Width = 900
End
Begin VB.Label Label11
AutoSize = -1 'True
Caption = "职称:"
Height = 180
Left = 2595
TabIndex = 17
Top = 1185
Width = 540
End
Begin VB.Label Label10
AutoSize = -1 'True
Caption = "职业:"
Height = 180
Left = 2595
TabIndex = 16
Top = 780
Width = 540
End
Begin VB.Label Label9
AutoSize = -1 'True
Caption = "性别:"
Height = 180
Left = 2610
TabIndex = 15
Top = 330
Width = 540
End
Begin VB.Label Label8
AutoSize = -1 'True
Caption = "备 注:"
Height = 180
Left = 285
TabIndex = 8
Top = 3240
Width = 900
End
Begin VB.Label Label7
AutoSize = -1 'True
Caption = "户口所在地:"
Height = 180
Left = 255
TabIndex = 7
Top = 2805
Width = 1080
End
Begin VB.Label Label6
AutoSize = -1 'True
Caption = "身份证号:"
Height = 180
Left = 285
TabIndex = 6
Top = 2385
Width = 900
End
Begin VB.Label Label5
AutoSize = -1 'True
Caption = "电 话:"
Height = 180
Left = 270
TabIndex = 5
Top = 2025
Width = 900
End
Begin VB.Label Label4
AutoSize = -1 'True
Caption = "手 机:"
Height = 180
Left = 285
TabIndex = 4
Top = 1635
Width = 900
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "婚姻状况:"
Height = 180
Left = 285
TabIndex = 3
Top = 1140
Width = 900
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "出生日期:"
Height = 180
Left = 285
TabIndex = 2
Top = 765
Width = 900
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "姓名:"
Height = 180
Left = 315
TabIndex = 1
Top = 345
Width = 540
End
End
End
Attribute VB_Name = "Frm_jtcyinfo"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Command1_Click()
Text1 = ""
Text4 = ""
Text5 = ""
Text6 = ""
Text7 = ""
Text8 = ""
Text10 = ""
Text11 = ""
Text12 = ""
Text13 = ""
Text14 = ""
Text15.Text = ""
Text1.SetFocus
Adodc1.RecordSource = "select * from tab_rkinfo order by 人口编号"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount > 0 Then
If Adodc1.Recordset.EOF = False Then
Adodc1.Recordset.MoveLast
Text2.Text = "rk" + Trim(Mid(Adodc1.Recordset.Fields("人口编号"), 3, 2) + 1)
Else
Text2.Text = "rk" + Trim(Mid(Adodc1.Recordset.Fields("人口编号"), 3, 2) + 1)
End If
Else
Text2.Text = "rk" + "1"
End If
Command2.Enabled = True
Command1.Enabled = False
End Sub
Private Sub Command2_Click()
If Text1 = "" Or Text4 = "" Or Text5 = "" Or Text6 = "" Or Text7 = "" Or Text8 = "" Or Text10 = "" Or Text11 = "" Or Text12 = "" Or Text13 = "" Or Text14 = "" Or Combo1 = "" Or Combo2 = "" Or Combo5 = "" Or Combo6 = "" Or Combo7 = "" Or Combo8 = "" Or DTPicker1.Value = "" Then
MsgBox "输入不允许为空", 48, "提示"
Exit Sub
End If
Set adors = cn.Execute("insert into tab_rkinfo values('" & Text2 & "','" & Text1 & "','" & Combo1 & "','" & DTPicker1 & "','" & Combo3 & "','" & Combo4 & "','" & Combo5 & "','" & Combo6 & "','" & Combo7 & "','" & Text14 & "','" & Combo2 & "','" & Text15 & "','" & Combo8 & "','" & Text11 & "','" & Text10 & "','" & Text4 & "','" & Text5 & "','" & Text13 & "','" & Frm_yzinfo.Text1 & "','" & Frm_yzinfo.Text2 & "','" & Frm_yzinfo.Text3 & "','" & Text6 & "','" & Text7 & "','" & Text12 & "','" & Frm_yzinfo.Text4 & "','" & Text8 & "') ")
MsgBox "数据保存成功", 78, "管理信息系统"
Adodc1.Refresh
cn.Close
Command2.Enabled = False
Command1.Enabled = True
End Sub
Private Sub Form_Load()
Command2.Enabled = False
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -