⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 企业部门表.frm

📁  随着计算机应用的普及
💻 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 + -