📄 frm_czrk_edit.frm
字号:
Password = ""
RecordSource = "select * from Table_HKB"
Caption = "Adodc1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin VB.TextBox txt_temp2
Height = 375
Left = 2640
TabIndex = 127
Text = "Text18"
Top = 7320
Width = 1215
End
Begin VB.TextBox Text18
Height = 375
Left = 480
TabIndex = 128
Text = "111"
Top = 6840
Width = 735
End
Begin MSComCtl2.DTPicker DTPicker7
Height = 375
Left = 120
TabIndex = 126
Top = 8040
Visible = 0 'False
Width = 1815
_ExtentX = 3201
_ExtentY = 661
_Version = 393216
Format = 48496641
CurrentDate = 38155
End
Begin VB.TextBox txt_temp1
Height = 375
Left = 4320
TabIndex = 125
Text = "Text18"
Top = 7200
Width = 1335
End
Begin VB.TextBox txt_temp3
Height = 375
Left = 960
TabIndex = 133
Top = 7080
Width = 1215
End
Begin VB.TextBox Text37
Height = 270
Left = 120
TabIndex = 134
Text = "0000-00-00"
Top = 7800
Visible = 0 'False
Width = 1455
End
Begin VB.Label Label59
Caption = "登记类型"
Height = 255
Left = 4920
TabIndex = 131
Top = 7920
Width = 975
End
Begin VB.Label Label58
Caption = "登记日期"
Height = 255
Left = 2160
TabIndex = 130
Top = 7920
Width = 975
End
End
Attribute VB_Name = "frm_CZRK_EDIT"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Check1_Click()
If Check1.Value = 1 Then
DTPicker5.Enabled = True
Text35.Enabled = True
Else
DTPicker5.Enabled = False
Text35.Enabled = False
End If
End Sub
Private Sub Check2_Click()
If Check2.Value = 1 Then
DTPicker6.Enabled = True
Text36.Enabled = True
Else
DTPicker6.Enabled = False
Text36.Enabled = False
End If
End Sub
Private Sub Cmd_end_Click()
Unload Me
End Sub
Private Sub Cmd_save_Click() '字符连接典型示例
Call main
If Check1.Value = 1 And Check2.Value = 0 Then
Set adoRs = adoCon.Execute("insert into Table_HKB values(" & Text18 & ",'" & Text2 & "','" & Combo1 & "','" & Text3 & "','" & Text1 & "','" & Text4 & "','" & Text5 & "','" & Text6 & "','" & Text9 & "','" & Text7 & "','" & Text8 & "','" & Text10 & "','" & Combo2 & "','" & Combo3 & "','" & Text11 & "','" & Text13 & "','" & Text16 & "','" & Text17 & "','" & Combo5 & _
"','" & txt_sfzhm & "','" & Text19 & "','" & DTPicker1 & "','" & DTPicker2 & "','" & Text20 & "','" & Text21 & "','" & Combo6 & "','" & Text22 & "','" & Combo7 & "','" & Combo8 & "','" & Text23 & "','" & Combo9 & "','" & Text24 & "','" & Text25 & "','" & Text26 & "','" & Text27 & "','" & Combo10 & "','" & Combo11 & "','" & Combo12 & "','" & Combo13 & "','" & Combo14 & "','" & Text28 & "','" & Text29 & "','" & Text30 & "','" & DTPicker3 & "','" & Text33 & "','" & Combo15 & "','" & Text32 & "','" & Text37 & "','" & Text33 & "','" & Combo16 & "','" & Text34 & "','" & DTPicker8 & "','" & Combo17 & "','" & Check1 & "','" & DTPicker5 & "','" & Text35 & "','" & Check2 & "','" & Text37 & "','" & Text36 & "')")
MsgBox "数据保存成功", 32, "提示'"
Cmd_save.Enabled = False
ElseIf Check2.Value = 1 And Check1.Value = 0 Then
Set adoRs = adoCon.Execute("insert into Table_HKB values(" & Text18 & ",'" & Text2 & "','" & Combo1 & "','" & Text3 & "','" & Text1 & "','" & Text4 & "','" & Text5 & "','" & Text6 & "','" & Text9 & "','" & Text7 & "','" & Text8 & "','" & Text10 & "','" & Combo2 & "','" & Combo3 & "','" & Text11 & "','" & Text13 & "','" & Text16 & "','" & Text17 & "','" & Combo5 & _
"','" & txt_sfzhm & "','" & Text19 & "','" & DTPicker1 & "','" & DTPicker2 & "','" & Text20 & "','" & Text21 & "','" & Combo6 & "','" & Text22 & "','" & Combo7 & "','" & Combo8 & "','" & Text23 & "','" & Combo9 & "','" & Text24 & "','" & Text25 & "','" & Text26 & "','" & Text27 & "','" & Combo10 & "','" & Combo11 & "','" & Combo12 & "','" & Combo13 & "','" & Combo14 & "','" & Text28 & "','" & Text29 & "','" & Text30 & "','" & DTPicker3 & "','" & Text33 & "','" & Combo15 & "','" & Text32 & "','" & Text37 & "','" & Text33 & "','" & Combo16 & "','" & Text34 & "','" & DTPicker8 & "','" & Combo17 & "','" & Check1 & "','" & Text37 & "','" & Text35 & "','" & Check2 & "','" & DTPicker6 & "','" & Text36 & "')")
MsgBox "数据保存成功", 32, "提示'"
Cmd_save.Enabled = False
ElseIf Check1.Value = 1 And Check2.Value = 1 Then
Set adoRs = adoCon.Execute("insert into Table_HKB values(" & Text18 & ",'" & Text2 & "','" & Combo1 & "','" & Text3 & "','" & Text1 & "','" & Text4 & "','" & Text5 & "','" & Text6 & "','" & Text9 & "','" & Text7 & "','" & Text8 & "','" & Text10 & "','" & Combo2 & "','" & Combo3 & "','" & Text11 & "','" & Text13 & "','" & Text16 & "','" & Text17 & "','" & Combo5 & _
"','" & txt_sfzhm & "','" & Text19 & "','" & DTPicker1 & "','" & DTPicker2 & "','" & Text20 & "','" & Text21 & "','" & Combo6 & "','" & Text22 & "','" & Combo7 & "','" & Combo8 & "','" & Text23 & "','" & Combo9 & "','" & Text24 & "','" & Text25 & "','" & Text26 & "','" & Text27 & "','" & Combo10 & "','" & Combo11 & "','" & Combo12 & "','" & Combo13 & "','" & Combo14 & "','" & Text28 & "','" & Text29 & "','" & Text30 & "','" & DTPicker3 & "','" & Text33 & "','" & Combo15 & "','" & Text32 & "','" & Text37 & "','" & Text33 & "','" & Combo16 & "','" & Text34 & "','" & DTPicker8 & "','" & Combo17 & "','" & Check1 & "','" & DTPicker5 & "','" & Text35 & "','" & Check2 & "','" & DTPicker6 & "','" & Text36 & "')")
MsgBox "数据保存成功", 32, "提示'"
Cmd_save.Enabled = False
Else
Set adoRs = adoCon.Execute("insert into Table_HKB values(" & Text18 & ",'" & Text2 & "','" & Combo1 & "','" & Text3 & "','" & Text1 & "','" & Text4 & "','" & Text5 & "','" & Text6 & "','" & Text9 & "','" & Text7 & "','" & Text8 & "','" & Text10 & "','" & Combo2 & "','" & Combo3 & "','" & Text11 & "','" & Text13 & "','" & Text16 & "','" & Text17 & "','" & Combo5 & _
"','" & txt_sfzhm & "','" & Text19 & "','" & DTPicker1 & "','" & DTPicker2 & "','" & Text20 & "','" & Text21 & "','" & Combo6 & "','" & Text22 & "','" & Combo7 & "','" & Combo8 & "','" & Text23 & "','" & Combo9 & "','" & Text24 & "','" & Text25 & "','" & Text26 & "','" & Text27 & "','" & Combo10 & "','" & Combo11 & "','" & Combo12 & "','" & Combo13 & "','" & Combo14 & "','" & Text28 & "','" & Text29 & "','" & Text30 & "','" & DTPicker3 & "','" & Text33 & "','" & Combo15 & "','" & Text32 & "','" & Text37 & "','" & Text33 & "','" & Combo16 & "','" & Text34 & "','" & DTPicker8 & "','" & Combo17 & "','" & Check1 & "','" & Text37 & "','" & Text35 & "','" & Check2 & "','" & Text37 & "','" & Text36 & "')")
MsgBox "数据保存成功", 32, "提示'"
Cmd_save.Enabled = False
End If
frm_CZRK_HKB.Adodc1.RecordSource = "select * from Table_HKB order by 户口簿号"
frm_CZRK_HKB.Adodc1.Refresh
Unload frm_CZRK_HKB
frm_CZRK_HKB.Refresh
frm_CZRK_HKB.Show
adoCon.Close
Unload Me
End Sub
Private Sub Cmd_th_add_Click()
Text12.Text = ""
Text13.Text = ""
Text14.Text = ""
Text15.Text = ""
Text16.Text = ""
Text17.Text = ""
txt_sfzhm.Text = ""
Text19.Text = ""
Text20.Text = ""
Text21.Text = ""
Text22.Text = ""
Text23.Text = ""
Text24.Text = ""
Text25.Text = ""
Text26.Text = ""
Text27.Text = ""
Text28.Text = ""
Text29.Text = ""
Text30.Text = ""
Text31.Text = ""
Text32.Text = ""
Text33.Text = ""
Text34.Text = ""
Text35.Text = ""
Text36.Text = ""
Combo4.Text = ""
Combo5.Text = ""
Combo6.Text = ""
Combo7.Text = ""
Combo8.Text = ""
Combo9.Text = ""
Combo10.Text = ""
Combo11.Text = ""
Combo12.Text = ""
Combo13.Text = ""
Combo14.Text = ""
Combo15.Text = ""
Combo16.Text = ""
Cmd_save.Enabled = True
frm_CZRK_THZJ.Show
End Sub
Private Sub Cmd_xh_add_Click()
Dim StrInput, Temp As String
Dim j As Integer
j = 1
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Text9.Text = ""
Text10.Text = ""
Text11.Text = ""
Text12.Text = ""
Text13.Text = ""
Text14.Text = ""
Text15.Text = ""
Text16.Text = ""
Text17.Text = ""
txt_sfzhm.Text = ""
Text19.Text = ""
Text20.Text = ""
Text21.Text = ""
Text22.Text = ""
Text23.Text = ""
Text24.Text = ""
Text25.Text = ""
Text26.Text = ""
Text27.Text = ""
Text28.Text = ""
Text29.Text = ""
Text30.Text = ""
Text31.Text = ""
Text32.Text = ""
Text33.Text = ""
Text34.Text = ""
Text35.Text = ""
Text36.Text = ""
Combo1.Text = ""
Combo2.Text = ""
Combo3.Text = ""
Combo4.Text = ""
Combo5.Text = ""
Combo6.Text = ""
Combo7.Text = ""
Combo8.Text = ""
Combo9.Text = ""
Combo10.Text = ""
Combo11.Text = ""
Combo12.Text = ""
Combo13.Text = ""
Combo14.Text = ""
Combo15.Text = ""
Combo16.Text = ""
Adodc1.RecordSource = "select * from Table_HKB order by 户口簿号"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount > 0 Then
Adodc1.Recordset.MoveLast
txt_temp1.Text = Adodc1.Recordset.Fields("户口簿号")
StrInput = txt_temp1.Text
txt_temp1.Text = Mid$(StrInput, j, 6)
If Trim(txt_temp2.Text) = Trim(txt_temp1.Text) Then
Text2.Text = Adodc1.Recordset.Fields("户口簿号")
Text2.Text = Val(Text2.Text) + 1
Text13.Text = Text2.Text + "001"
Cmd_save.Enabled = True
ElseIf Val(txt_temp2.Text) < Val(txt_temp1.Text) Then
Text2.Text = ""
Cmd_save.Enabled = False
MsgBox "系统日期有错误,户口簿号不能生成,请您检查系统日期"
Else
Text2.Text = txt_temp2.Text + "00001"
Text13.Text = Text2.Text + "001"
Cmd_save.Enabled = True
End If
Else
Text2.Text = txt_temp2.Text + "00001"
Text13.Text = Text2.Text + "001"
Cmd_save.Enabled = True
End If
End Sub
Private Sub Combo1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text3.SetFocus
Else
End If
End Sub
Private Sub Combo1_LostFocus()
Combo4.Text = Combo1.Text
End Sub
Private Sub Combo10_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text27.SetFocus
Else
End If
End Sub
Private Sub Combo11_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Combo12.SetFocus
Else
End If
End Sub
Private Sub Combo12_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Combo13.SetFocus
Else
End If
End Sub
Private Sub Combo13_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Combo14.SetFocus
Else
End If
End Sub
Private Sub Combo14_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text28.SetFocus
Else
End If
End Sub
Private Sub Combo15_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text31.SetFocus
Else
End If
End Sub
Private Sub Combo16_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text33.SetFocus
Else
End If
End Sub
Private Sub Combo2_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Combo3.SetFocus
Else
End If
End Sub
Private Sub Combo3_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text11.SetFocus
Else
End If
End Sub
Private Sub Combo4_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text13.SetFocus
Else
End If
End Sub
Private Sub Combo5_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
txt_sfzhm.SetFocus
Else
End If
End Sub
Private Sub Combo6_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text22.SetFocus
Else
End If
End Sub
Private Sub Combo7_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Combo8.SetFocus
Else
End If
End Sub
Private Sub Combo8_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text23.SetFocus
Else
End If
End Sub
Private Sub Combo9_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text24.SetFocus
Else
End If
End Sub
Private Sub DTPicker1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text21.SetFocus
Else
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -