📄 frmmodifyyginfo.frm
字号:
VERSION 5.00
Begin VB.Form frmModifydepartment
Caption = "修改部门信息"
ClientHeight = 4920
ClientLeft = 60
ClientTop = 510
ClientWidth = 8820
LinkTopic = "Form1"
ScaleHeight = 4920
ScaleWidth = 8820
StartUpPosition = 3 '窗口缺省
Begin VB.ComboBox Combo1
Height = 300
ItemData = "frmModifyyginfo.frx":0000
Left = 3240
List = "frmModifyyginfo.frx":0013
TabIndex = 5
Top = 600
Width = 2535
End
Begin VB.TextBox Text1
Height = 390
Left = 3240
TabIndex = 4
Top = 1200
Width = 2535
End
Begin VB.ComboBox Combo2
Height = 300
ItemData = "frmModifyyginfo.frx":003A
Left = 3240
List = "frmModifyyginfo.frx":0047
TabIndex = 3
Top = 2040
Width = 2535
End
Begin VB.TextBox Text2
Height = 1455
Left = 3240
TabIndex = 2
Top = 2760
Width = 2535
End
Begin VB.CommandButton Command2
Caption = "退出"
Height = 375
Left = 7080
TabIndex = 1
Top = 2160
Width = 855
End
Begin VB.CommandButton Command1
Caption = "修改"
Height = 375
Left = 7080
TabIndex = 0
Top = 1080
Width = 855
End
Begin VB.Label Label1
Caption = "部门编号:"
Height = 255
Left = 1800
TabIndex = 9
Top = 600
Width = 975
End
Begin VB.Label Label2
Caption = "部门名称:"
Height = 375
Left = 1800
TabIndex = 8
Top = 1320
Width = 975
End
Begin VB.Label Label3
Caption = "上级部门编号:"
Height = 375
Left = 1800
TabIndex = 7
Top = 2040
Width = 1335
End
Begin VB.Label Label4
Caption = "部 门 职 能 描 述:"
Height = 855
Left = 1920
TabIndex = 6
Top = 3000
Width = 1095
End
End
Attribute VB_Name = "frmModifydepartment"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim mrc As ADODB.Recordset
Private Sub Command1_Click()
Dim txtSQL As String
On Error GoTo er
Set mrc = New ADODB.Recordset
With mrc
.ActiveConnection = cnn
.CursorLocation = adUseClient
.CursorType = adOpenKeyset
.LockType = adLockOptimistic
End With
txtSQL = "update 企业部门信息表 set Dep_name='" & Text1.Text & "',UpperId='" & Combo2.Text & "',Describe='" & Text2.Text & "' where Dep_id=" & Combo1.Text
mrc.Open txtSQL
MsgBox "企业部门信息修改成功!"
txtSQL = "select * from 企业部门信息表 where Dep_id='" & Combo1.Text & "'"
mrc.Open txtSQL
Set DataGrid1.DataSource = stdrs
DataGrid1.ReBind
If isAdding Then isAdding = False
Exit Sub
er:
MsgBox Err.Description
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -