📄 frm_czrk_bjtj.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form frm_CZRK_BJTJ
BorderStyle = 3 'Fixed Dialog
Caption = "Form1"
ClientHeight = 2085
ClientLeft = 45
ClientTop = 330
ClientWidth = 4185
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2085
ScaleWidth = 4185
ShowInTaskbar = 0 'False
StartUpPosition = 3 '窗口缺省
Begin MSAdodcLib.Adodc Adodc2
Height = 375
Left = 240
Top = 2760
Width = 1695
_ExtentX = 2990
_ExtentY = 661
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 1
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=RKGL"
OLEDBString = "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=RKGL"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from Table_HKB_TXFS"
Caption = "Adodc2"
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.CommandButton Cmd_del_grxx
Caption = "确定"
Height = 375
Left = 2040
TabIndex = 12
Top = 1680
Width = 975
End
Begin MSAdodcLib.Adodc Adodc1
Height = 375
Left = 120
Top = 1680
Visible = 0 'False
Width = 1815
_ExtentX = 3201
_ExtentY = 661
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 1
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=RKGL"
OLEDBString = "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=RKGL"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
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.OptionButton Option2
Caption = "删除个人信息"
Height = 255
Left = 2520
TabIndex = 3
Top = 120
Width = 1575
End
Begin VB.OptionButton Option1
Caption = "删除家庭信息"
Height = 255
Left = 360
TabIndex = 2
Top = 120
Width = 1815
End
Begin VB.CommandButton Command2
Caption = "取消"
Height = 375
Left = 3120
TabIndex = 1
Top = 1680
Width = 975
End
Begin VB.Frame Frame1
Height = 1215
Left = 120
TabIndex = 0
Top = 360
Width = 3975
Begin VB.TextBox Text2
Enabled = 0 'False
Height = 375
Left = 2040
TabIndex = 7
Top = 600
Width = 1695
End
Begin VB.TextBox Text1
Enabled = 0 'False
Height = 375
Left = 240
TabIndex = 6
Top = 600
Width = 1695
End
Begin VB.Label Label2
Caption = "输入人口编号"
Height = 255
Left = 2280
TabIndex = 5
Top = 240
Width = 1455
End
Begin VB.Label Label1
Caption = "输入户口簿号"
Height = 375
Left = 480
TabIndex = 4
Top = 240
Width = 1335
End
End
Begin VB.CommandButton Cmd_del_jtxx
Caption = "确定"
Height = 375
Left = 2040
TabIndex = 8
Top = 1680
Width = 975
End
Begin VB.CommandButton Cmd_edit
Caption = "确定"
Height = 375
Left = 2040
TabIndex = 9
Top = 1680
Width = 975
End
Begin VB.CommandButton Cmd_edit1
Caption = "确定"
Height = 375
Left = 2040
TabIndex = 10
Top = 1680
Width = 975
End
Begin VB.Label Label3
Caption = "修改个人信息"
Height = 255
Left = 2640
TabIndex = 11
Top = 150
Width = 1335
End
End
Attribute VB_Name = "frm_CZRK_BJTJ"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Cmd_del_grxx_Click() ' 删除个人信息
Dim i
Adodc1.RecordSource = "select * from Table_HKB where 户口簿号='" + Text1.Text + "' and 人口编号='" + Text2.Text + "'"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount > 0 Then
i = MsgBox("您确认要删除该信息么?", 17, "人口信息管理系统")
If i = vbOK Then
Adodc2.RecordSource = "select * from Table_HKB_TXFS where 人口编号='" + Adodc1.Recordset.Fields("人口编号") + "'"
Adodc2.Refresh
If Adodc2.Recordset.RecordCount > 0 Then
Adodc2.Recordset.Delete
Else
End If
Adodc1.Recordset.Delete
Text1.Text = ""
Text2.Text = ""
Else
End If
frm_CZRK_HKB.Adodc1.Refresh
Else
i = MsgBox("数据库中已经没有可删除的记录", 48, "人口信息管理系统")
Text1.Text = ""
Text2.Text = ""
End If
End Sub
Private Sub Cmd_del_jtxx_Click() ' 删除家庭信息
Dim i
Adodc1.RecordSource = "select * from Table_HKB where 户口簿号='" + Text1.Text + "'"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount > 0 Then
i = MsgBox("您确认要删除该信息么?", 17, "人口信息管理系统")
If i = vbOK Then
Adodc2.RecordSource = "select * from Table_HKB_TXFS where 人口编号='" + Adodc1.Recordset.Fields("人口编号") + "'"
Adodc2.Refresh
If Adodc2.Recordset.RecordCount > 0 Then
Adodc2.Recordset.Delete
Else
End If
Adodc1.Recordset.MoveFirst
Do While Adodc1.Recordset.EOF = False
If Trim(Text1.Text) = Trim(Adodc1.Recordset.Fields("户口簿号")) Then
Adodc1.Recordset.Delete
Else
End If
Adodc1.Recordset.MoveNext
Loop
Text1.Text = ""
Text2.Text = ""
Else
End If
frm_CZRK_HKB.Adodc1.Refresh
Else
i = MsgBox("数据库中已经没有可删除的记录", 48, "人口信息管理系统")
Text1.Text = ""
Text2.Text = ""
End If
End Sub
Private Sub Cmd_edit_Click()
frm_CZRK_XXEDIT.Adodc1.RecordSource = "select * from Table_HKB where 户口簿号='" + Text1.Text + "'"
frm_CZRK_XXEDIT.Adodc1.Refresh
If frm_CZRK_XXEDIT.Adodc1.Recordset.RecordCount > 0 Then
frm_CZRK_XXEDIT.Show
frm_CZRK_XXEDIT.Caption = "常住人口信息修改"
frm_CZRK_XXEDIT.Cmd_update.Visible = True
Else
MsgBox "没有此信息,请您确认后重新选择", 48, "提示"
End If
'Unload frm_CZRK_HKB
'frm_CZRK_HKB.Refresh
'frm_CZRK_HKB.Show
Unload Me
End Sub
Private Sub Cmd_edit1_Click()
frm_CZRK_XXEDIT.Adodc1.RecordSource = "select * from Table_HKB where 户口簿号='" + Text1.Text + "' and 人口编号='" + Text2.Text + "'"
frm_CZRK_XXEDIT.Adodc1.Refresh
If frm_CZRK_XXEDIT.Adodc1.Recordset.RecordCount > 0 Then
frm_CZRK_XXEDIT.Show
frm_CZRK_XXEDIT.Caption = "常住人口信息修改"
frm_CZRK_XXEDIT.Cmd_update.Visible = True
Else
MsgBox "没有此信息,请您确认后重新选择", 48, "提示"
End If
'Unload frm_CZRK_HKB
'frm_CZRK_HKB.Refresh
'frm_CZRK_HKB.Show
Unload Me
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Load()
Me.Left = (Screen.Width - Me.Width) / 2
Me.Top = (Screen.Height - Me.Height) / 2
End Sub
Private Sub Option1_Click()
Text1.Enabled = True
Text2.Enabled = False
Cmd_del_jtxx.Visible = True
Cmd_del_grxx.Visible = False
Cmd_edit.Visible = False
End Sub
Private Sub Option2_Click()
Text1.Enabled = True
Text2.Enabled = True
Cmd_del_jtxx.Visible = False
Cmd_del_grxx.Visible = True
Cmd_edit.Visible = False
End Sub
'Private Sub Option3_Click()
'Text1.Enabled = True
'Text2.Enabled = False
'Cmd_del_jtxx.Visible = False
''Cmd_del_grxx.Visible = False
'Cmd_edit.Visible = True
'Cmd_edit1.Visible = False
'Cmd_edit.Visible = True
'End Sub
'Private Sub Option4_Click()
'Text1.Enabled = True
'Text2.Enabled = True
'Cmd_del_jtxx.Visible = False
''Cmd_del_grxx.Visible = False
'Cmd_edit.Visible = False
'Cmd_edit1.Visible = True
'End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -