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

📄 openkpdialog.frm

📁 针对矿山企业安全相关法律开发的企业考核评价系统
💻 FRM
字号:
VERSION 5.00
Begin VB.Form OpenKPDialog 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "打开考评"
   ClientHeight    =   2160
   ClientLeft      =   2760
   ClientTop       =   3750
   ClientWidth     =   4590
   Icon            =   "OpenKPDialog.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2160
   ScaleWidth      =   4590
   ShowInTaskbar   =   0   'False
   Begin VB.ComboBox Combo1 
      Height          =   300
      ItemData        =   "OpenKPDialog.frx":000C
      Left            =   960
      List            =   "OpenKPDialog.frx":000E
      Style           =   2  'Dropdown List
      TabIndex        =   2
      Top             =   480
      Width           =   2535
   End
   Begin VB.CommandButton CancelButton 
      Caption         =   "取消"
      Height          =   375
      Left            =   2640
      TabIndex        =   1
      Top             =   1560
      Width           =   1215
   End
   Begin VB.CommandButton OKButton 
      Caption         =   "确定"
      Height          =   375
      Left            =   480
      TabIndex        =   0
      Top             =   1560
      Width           =   1215
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "请选择企业名称"
      Height          =   180
      Left            =   960
      TabIndex        =   3
      Top             =   120
      Width           =   1260
   End
End
Attribute VB_Name = "OpenKPDialog"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Option Explicit

Private Sub CancelButton_Click()
    Unload Me
End Sub

Private Sub Form_Load()
Set EnterpriseRS = sysDB.OpenRecordset("Select * From Enterprise")
ErsOpened = True
If EnterpriseRS.BOF Then
    MsgBox "没有可以打开的考评!"
    'Unload Me
Else
    Do While Not EnterpriseRS.EOF
        Combo1.AddItem EnterpriseRS.Fields("Name")
        EnterpriseRS.MoveNext
    Loop
    Combo1.ListIndex = 0
End If
End Sub

Private Sub OKButton_Click()
    If Combo1.Text <> "" Then
        EnterpriseRS.FindFirst "Name='" & Combo1.Text & "'"
        If EnterpriseRS.NoMatch Then
            MsgBox "企业名称有误!"
        Else
            EnterpriseName = Combo1.Text
            frmMain.mnuAQGL.Enabled = True
            frmMain.mnuDCXT.Enabled = True
            frmMain.mnuLCXT.Enabled = True
            frmMain.mnuWKK.Enabled = True
            Unload Me
            frmMain.Caption = "矿山企业考评系统" & "[" & EnterpriseName & "]"
        End If
    Else
        MsgBox "请先选择!"
    End If
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -