?? 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
'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 + -