?? 企業部門表.frm
字號:
VERSION 5.00
Begin VB.Form frmAdddepartment
Caption = "企業部門信息表"
ClientHeight = 5145
ClientLeft = 60
ClientTop = 510
ClientWidth = 7875
LinkTopic = "Form2"
ScaleHeight = 5145
ScaleWidth = 7875
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command2
Caption = "返回"
Height = 495
Left = 6000
TabIndex = 9
Top = 2280
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "保存"
Height = 495
Left = 6000
TabIndex = 8
Top = 960
Width = 1215
End
Begin VB.TextBox Text2
Height = 1455
Left = 2640
TabIndex = 6
Top = 2760
Width = 2535
End
Begin VB.ComboBox Combo2
Height = 300
ItemData = "企業部門表.frx":0000
Left = 2640
List = "企業部門表.frx":000D
TabIndex = 5
Top = 2040
Width = 2535
End
Begin VB.TextBox Text1
Height = 390
Left = 2640
TabIndex = 3
Top = 1200
Width = 2535
End
Begin VB.ComboBox Combo1
Height = 300
ItemData = "企業部門表.frx":0026
Left = 2640
List = "企業部門表.frx":0039
TabIndex = 1
Top = 600
Width = 2535
End
Begin VB.Label Label4
Caption = "部 門 職 能 描 述:"
Height = 855
Left = 1320
TabIndex = 7
Top = 3000
Width = 1095
End
Begin VB.Label Label3
Caption = "上級部門編號:"
Height = 375
Left = 1200
TabIndex = 4
Top = 2040
Width = 1335
End
Begin VB.Label Label2
Caption = "部門名稱:"
Height = 375
Left = 1200
TabIndex = 2
Top = 1320
Width = 975
End
Begin VB.Label Label1
Caption = "部門編號:"
Height = 255
Left = 1200
TabIndex = 0
Top = 600
Width = 975
End
End
Attribute VB_Name = "frmAdddepartment"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'Private Sub Command1_Click()
Dim mrc As ADODB.Recordset
' Dim txtSQL As String
Dim MsgText As String
' Dim mrc As ADODB.Recordset
Private Sub Command1_Click()
Dim txtsql As String
Set mrc = New ADODB.Recordset
With mrc
.ActiveConnection = cnn
.CursorLocation = adUseClient
.CursorType = adOpenKeyset
.LockType = adLockOptimistic
End With
txtsql = "insert into 企業部門信息表 (Dep_id,Dep_name,UpperId, Describe)"
txtsql = txtsql & "values('"
txtsql = txtsql & Combo1.Text & "','"
txtsql = txtsql & Text1.Text & "','"
txtsql = txtsql & Combo2.Text & "','"
txtsql = txtsql & Text2.Text & "'"
txtsql = txtsql & ")"
mrc.Open txtsql '執行SQL語句
MsgBox "信息插入成功!", vbOKOnly + vbExclamation, "企業部門信息表"
'If Not stdrs.EOF Then
'MsgBox "插入成功!"
Set mrc = Nothing
contiue = False
'End If
Exit Sub
End Sub
'Dim mrc As ADODB.Recordset
Private Sub Command2_Click()
Unload Me
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -