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

📄 form2.frm

📁 is also very important for life
💻 FRM
字号:
VERSION 5.00
Object = "{00028C01-0000-0000-0000-000000000046}#1.0#0"; "DBGRID32.OCX"
Begin VB.Form Form2 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "Form2"
   ClientHeight    =   8190
   ClientLeft      =   45
   ClientTop       =   435
   ClientWidth     =   11010
   LinkTopic       =   "Form2"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   8190
   ScaleWidth      =   11010
   StartUpPosition =   3  'Windows Default
   Begin VB.CommandButton Command2 
      Caption         =   "&DELETE"
      BeginProperty Font 
         Name            =   "Arial Black"
         Size            =   18
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   -1  'True
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Left            =   5040
      TabIndex        =   2
      Top             =   7200
      Width           =   2655
   End
   Begin VB.CommandButton Command1 
      Caption         =   "<<&BACK"
      BeginProperty Font 
         Name            =   "Arial Black"
         Size            =   18
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   -1  'True
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Left            =   2400
      TabIndex        =   1
      Top             =   7200
      Width           =   2415
   End
   Begin MSDBGrid.DBGrid DBGrid1 
      Bindings        =   "Form2.frx":0000
      Height          =   5535
      Left            =   1200
      OleObjectBlob   =   "Form2.frx":0014
      TabIndex        =   0
      Top             =   1080
      Width           =   8535
   End
   Begin VB.Data Data1 
      Connect         =   "Access"
      DatabaseName    =   "F:\RRRR\QQ.mdb"
      DefaultCursorType=   0  'DefaultCursor
      DefaultType     =   2  'UseODBC
      Exclusive       =   0   'False
      Height          =   345
      Left            =   1200
      Options         =   0
      ReadOnly        =   0   'False
      RecordsetType   =   1  'Dynaset
      RecordSource    =   "QQQQ"
      Top             =   6600
      Width           =   8535
   End
End
Attribute VB_Name = "Form2"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Form2.Visible = False
End Sub

Private Sub Command2_Click()

Dim res As Integer
res = MsgBox("Do you want to delete all events?", vbYesNo, "Confirm")

If (res = vbYes) Then
    Data1.Recordset.MoveFirst
    While (Not Data1.Recordset.EOF)
         Data1.Recordset.Delete
         Data1.Recordset.MoveNext
    Wend
    
    Data1.UpdateRecord
    Data1.Refresh
    DBGrid1.Refresh
End If


End Sub

Private Sub Form_Load()
Data1.DatabaseName = App.Path & "\QQ.mdb"
Data1.RecordSource = "QQQQ"
End Sub

⌨️ 快捷键说明

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