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

📄 delform.frm

📁 ***** 展会管理系统 V1.1 共享版 **************  一、安装        1.运行setup.exe文件; 2.如果不同意默认安装目录
💻 FRM
字号:
VERSION 5.00
Begin VB.Form DelForm 
   AutoRedraw      =   -1  'True
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "删除过时的展会"
   ClientHeight    =   4725
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   8115
   ControlBox      =   0   'False
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   MinButton       =   0   'False
   ScaleHeight     =   4725
   ScaleWidth      =   8115
   ShowInTaskbar   =   0   'False
   Begin VB.ComboBox Combo1 
      BackColor       =   &H00FFFFC0&
      ForeColor       =   &H00C00000&
      Height          =   300
      Left            =   3990
      Style           =   2  'Dropdown List
      TabIndex        =   29
      Top             =   435
      Width           =   3795
   End
   Begin VB.Frame Frame1 
      Caption         =   "Delet Fair Data"
      ForeColor       =   &H00004040&
      Height          =   870
      Left            =   315
      TabIndex        =   15
      Top             =   285
      Width           =   2370
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "删除展览会"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   20.25
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H000000FF&
         Height          =   405
         Index           =   1
         Left            =   165
         TabIndex        =   16
         Top             =   315
         Width           =   2100
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "删除展览会"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   20.25
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00808080&
         Height          =   405
         Index           =   0
         Left            =   165
         TabIndex        =   17
         Top             =   330
         Width           =   2100
      End
   End
   Begin VB.PictureBox Picture1 
      AutoRedraw      =   -1  'True
      BorderStyle     =   0  'None
      Height          =   510
      Left            =   5175
      ScaleHeight     =   510
      ScaleWidth      =   2625
      TabIndex        =   14
      Top             =   3945
      Width           =   2625
      Begin VB.CommandButton OK 
         Caption         =   "删除(&D)"
         Height          =   405
         Left            =   30
         TabIndex        =   0
         ToolTipText     =   "删除当前的展会"
         Top             =   30
         Width           =   1230
      End
      Begin VB.CommandButton QX 
         Cancel          =   -1  'True
         Caption         =   "取消(&C)"
         Height          =   405
         Left            =   1320
         TabIndex        =   1
         ToolTipText     =   "放弃删除"
         Top             =   30
         Width           =   1230
      End
   End
   Begin VB.TextBox FieldTxt 
      Enabled         =   0   'False
      Height          =   285
      Index           =   1
      Left            =   3990
      MaxLength       =   40
      TabIndex        =   13
      Top             =   855
      Width           =   3795
   End
   Begin VB.TextBox FieldTxt 
      Enabled         =   0   'False
      Height          =   285
      Index           =   2
      Left            =   1185
      MaxLength       =   10
      TabIndex        =   12
      Top             =   1470
      Width           =   2745
   End
   Begin VB.TextBox FieldTxt 
      Enabled         =   0   'False
      Height          =   285
      Index           =   3
      Left            =   1185
      MaxLength       =   5
      TabIndex        =   11
      Top             =   1860
      Width           =   780
   End
   Begin VB.TextBox FieldTxt 
      Enabled         =   0   'False
      Height          =   285
      Index           =   4
      Left            =   1185
      MaxLength       =   30
      TabIndex        =   10
      Top             =   2265
      Width           =   2745
   End
   Begin VB.TextBox FieldTxt 
      Enabled         =   0   'False
      Height          =   285
      Index           =   5
      Left            =   1185
      MaxLength       =   50
      TabIndex        =   9
      Top             =   2640
      Width           =   2745
   End
   Begin VB.TextBox FieldTxt 
      Enabled         =   0   'False
      Height          =   285
      Index           =   6
      Left            =   1185
      MaxLength       =   50
      TabIndex        =   8
      Top             =   3015
      Width           =   2745
   End
   Begin VB.TextBox FieldTxt 
      Enabled         =   0   'False
      Height          =   285
      Index           =   7
      Left            =   1185
      MaxLength       =   80
      TabIndex        =   7
      Top             =   3390
      Width           =   2745
   End
   Begin VB.TextBox FieldTxt 
      Enabled         =   0   'False
      Height          =   285
      Index           =   8
      Left            =   1185
      MaxLength       =   80
      TabIndex        =   6
      Top             =   3765
      Width           =   2745
   End
   Begin VB.TextBox FieldTxt 
      Enabled         =   0   'False
      Height          =   285
      Index           =   10
      Left            =   3060
      MaxLength       =   2
      TabIndex        =   5
      Top             =   1860
      Width           =   855
   End
   Begin VB.TextBox FieldTxt 
      Enabled         =   0   'False
      Height          =   285
      Index           =   11
      Left            =   1185
      MaxLength       =   30
      TabIndex        =   4
      Top             =   4140
      Width           =   2745
   End
   Begin VB.Frame Frame2 
      Height          =   1920
      Left            =   4110
      TabIndex        =   2
      Top             =   1665
      Width           =   3690
      Begin VB.TextBox FieldTxt 
         Enabled         =   0   'False
         Height          =   1650
         Index           =   9
         Left            =   90
         MaxLength       =   125
         MultiLine       =   -1  'True
         ScrollBars      =   2  'Vertical
         TabIndex        =   3
         Top             =   180
         Width           =   3495
      End
   End
   Begin VB.Label Label11 
      AutoSize        =   -1  'True
      Caption         =   "展 出 内 容"
      ForeColor       =   &H00800080&
      Height          =   180
      Left            =   5670
      TabIndex        =   30
      Top             =   1440
      Width           =   990
   End
   Begin VB.Label Label2 
      AutoSize        =   -1  'True
      Caption         =   "展会名称:"
      Height          =   180
      Left            =   3060
      TabIndex        =   28
      Top             =   495
      Width           =   900
   End
   Begin VB.Label Label3 
      AutoSize        =   -1  'True
      Caption         =   "展出地点:"
      Height          =   180
      Left            =   3060
      TabIndex        =   27
      Top             =   885
      Width           =   900
   End
   Begin VB.Label Label4 
      AutoSize        =   -1  'True
      Caption         =   "展出时间:"
      Height          =   180
      Left            =   270
      TabIndex        =   26
      Top             =   1515
      Width           =   900
   End
   Begin VB.Label Label5 
      AutoSize        =   -1  'True
      Caption         =   "联系人:"
      Height          =   180
      Left            =   465
      TabIndex        =   25
      Top             =   1920
      Width           =   720
   End
   Begin VB.Label Label6 
      AutoSize        =   -1  'True
      Caption         =   "单位:"
      Height          =   180
      Left            =   630
      TabIndex        =   24
      Top             =   2310
      Width           =   540
   End
   Begin VB.Label Label7 
      AutoSize        =   -1  'True
      Caption         =   "电话:"
      Height          =   180
      Left            =   630
      TabIndex        =   23
      Top             =   2670
      Width           =   540
   End
   Begin VB.Label Label8 
      AutoSize        =   -1  'True
      Caption         =   "传真:"
      Height          =   180
      Left            =   630
      TabIndex        =   22
      Top             =   3045
      Width           =   540
   End
   Begin VB.Label Label9 
      AutoSize        =   -1  'True
      Caption         =   "邮件:"
      Height          =   180
      Left            =   630
      TabIndex        =   21
      Top             =   3420
      Width           =   540
   End
   Begin VB.Label Label10 
      AutoSize        =   -1  'True
      Caption         =   "网址:"
      Height          =   180
      Left            =   630
      TabIndex        =   20
      Top             =   3780
      Width           =   540
   End
   Begin VB.Label Label12 
      AutoSize        =   -1  'True
      Caption         =   "天数:"
      Height          =   180
      Left            =   2505
      TabIndex        =   19
      Top             =   1920
      Width           =   540
   End
   Begin VB.Label Label13 
      AutoSize        =   -1  'True
      Caption         =   "地址:"
      Height          =   180
      Left            =   630
      TabIndex        =   18
      Top             =   4155
      Width           =   540
   End
End
Attribute VB_Name = "DelForm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Combo1_Click()
Dim Db As Database, Ef As Recordset, X As Integer, TempStr As String
    Set Db = OpenDatabase(Browser + "Fair.mdb")
    Set Ef = Db.OpenRecordset("Fair", dbOpenDynaset)
        TempStr = "展会名称='" & Combo1.Text & "'"
        Ef.FindFirst TempStr
    For X = 1 To 11
        If Not IsNull(Ef.Fields(X).Value) Then
           TempStr = Ef.Fields(X).Value
        End If
           FieldTxt(X).Text = TempStr
    Next
Db.Close
End Sub

Private Sub Form_Load()
DelForm.Left = Menu.Width
DelForm.Top = Menu.Height - DelForm.Height
Dim Db As Database, Ef As Recordset, X As Integer, Y As Integer, TempStr As String
   Set Db = OpenDatabase(Browser + "Fair.mdb")
   Set Ef = Db.OpenRecordset("Fair", dbOpenTable)
       Y = Ef.RecordCount
   Set Ef = Db.OpenRecordset("Fair", dbOpenDynaset)
   For X = 0 To Y - 1
       If Not IsNull(Ef.Fields(0).Value) Then
          TempStr = Ef.Fields(0).Value
       End If
       Combo1.AddItem TempStr, X
       Ef.MoveNext
   Next
Db.Close
On Error GoTo ErrCom
Combo1.ListIndex = 0
Exit Sub
ErrCom:
 Exit Sub
End Sub

Private Sub OK_Click()
If Combo1.Text = "" Then Exit Sub
Dim OkD As Integer
    OkD = MsgBox("真的要删除[ " & Combo1.Text & " ]展会吗(Y/N)?", vbYesNo + 16, "提示:")
    If OkD = 6 Then
       Dim Db As Database, TempStr As String, X As Integer, Y As Integer
       Set Db = OpenDatabase(Browser + "Fair.mdb")
           TempStr = "展会名称='" & Combo1.Text & "'"
           TempStr = "Delete * From Fair Where " & TempStr
           Db.Execute TempStr
       Set Ef = Db.OpenRecordset("Fair", dbOpenTable)
           For X = 1 To 11
               FieldTxt(X).Text = ""
           Next
           Y = Ef.RecordCount
       Set Ef = Db.OpenRecordset("Fair", dbOpenDynaset)
           Combo1.Clear
           For X = 0 To Y - 1
             If Not IsNull(Ef.Fields(0).Value) Then
                TempStr = Ef.Fields(0).Value
             End If
             Combo1.AddItem TempStr, X
           Ef.MoveNext
        Next
        Db.Close
        On Error GoTo ErrFair
        Combo1.ListIndex = 0
       Else
        Exit Sub
    End If
    Exit Sub
ErrFair:
   Exit Sub
End Sub

Private Sub QX_Click()
Unload Me
End Sub

⌨️ 快捷键说明

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