📄 form6.frm
字号:
VERSION 5.00
Begin VB.Form Form6
Caption = "企业部门信息"
ClientHeight = 3330
ClientLeft = 60
ClientTop = 450
ClientWidth = 7755
LinkTopic = "Form6"
ScaleHeight = 3330
ScaleWidth = 7755
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command1
Caption = "添加"
Height = 495
Left = 1080
TabIndex = 8
Top = 2640
Width = 1215
End
Begin VB.CommandButton Command2
Caption = "更新"
Height = 495
Left = 3360
TabIndex = 7
Top = 2640
Width = 1215
End
Begin VB.CommandButton Command3
BackColor = &H00C0FFFF&
Caption = "退出"
Height = 495
Left = 5520
TabIndex = 6
Top = 2640
Width = 1215
End
Begin VB.CommandButton Command7
Caption = ">|"
Height = 495
Left = 4560
Style = 1 'Graphical
TabIndex = 5
Top = 1800
Width = 495
End
Begin VB.CommandButton Command6
Caption = ">"
Height = 495
Left = 4080
TabIndex = 4
Top = 1800
Width = 495
End
Begin VB.CommandButton Command5
Caption = "<"
Height = 495
Left = 3600
TabIndex = 3
Top = 1800
Width = 495
End
Begin VB.CommandButton Command4
Caption = "|<"
Height = 495
Left = 3120
MaskColor = &H00C0FFC0&
TabIndex = 2
Top = 1800
Width = 495
End
Begin VB.TextBox Text1
Height = 495
Left = 2880
TabIndex = 1
Top = 120
Width = 2415
End
Begin VB.TextBox Text2
Height = 495
Left = 2880
TabIndex = 0
Top = 1080
Width = 2415
End
Begin VB.Label Label1
Caption = "部门编号"
Height = 495
Left = 960
TabIndex = 10
Top = 120
Width = 1935
End
Begin VB.Label Label2
Caption = "部门名称"
Height = 495
Left = 960
TabIndex = 9
Top = 1080
Width = 1935
End
End
Attribute VB_Name = "Form6"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
If Text1.Text <> "" Then
Form1.Adodc1.Recordset.AddNew
Else
a = MsgBox("请输入部门编号信息", , "警告")
End If
End Sub
Private Sub Command4_Click()
Form1.Adodc1.Refresh
Form1.Adodc1.Recordset.MoveFirst
End Sub
Private Sub Command5_Click()
If Not Form1.Adodc1.Recordset.BOF Then
Form1.Adodc1.Recordset.MovePrevious
End If
End Sub
Private Sub Command6_Click()
If Not Form1.Adodc1.Recordset.EOF Then
Form1.Adodc1.Recordset.MoveNext
End If
End Sub
Private Sub Command7_Click()
Form1.Adodc1.Refresh
Form1.Adodc1.Recordset.MoveLast
End Sub
Private Sub Form_Activate()
Form1.Adodc1.RecordSource = "企业部门信息表"
Form1.Adodc1.Refresh
Set Text1.DataSource = Form1.Adodc1
Text1.DataField = "部门编号"
Set Text2.DataSource = Form1.Adodc1
Text2.DataField = "部门名称"
End Sub
Private Sub Command2_Click()
If Text1.Text <> "" Then
a = MsgBox("确认要更新!", 1, "警告")
Else
MsgBox ("请选择数据")
End If
If a = 1 Then Form1.Adodc1.Recordset.Update
End Sub
Private Sub Command3_Click()
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -