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

📄 form3.4.frm

📁 VB实验教程源码
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   3090
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   4680
   LinkTopic       =   "Form1"
   ScaleHeight     =   3090
   ScaleWidth      =   4680
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command4 
      Caption         =   "移动"
      Height          =   375
      Left            =   3480
      TabIndex        =   13
      Top             =   1680
      Width           =   855
   End
   Begin VB.CommandButton Command3 
      Caption         =   "修改"
      Height          =   375
      Left            =   3480
      TabIndex        =   12
      Top             =   1200
      Width           =   855
   End
   Begin VB.CommandButton Command2 
      Caption         =   "删除"
      Height          =   375
      Left            =   3480
      TabIndex        =   11
      Top             =   720
      Width           =   855
   End
   Begin VB.CommandButton Command1 
      Caption         =   "添加"
      Height          =   375
      Left            =   3480
      TabIndex        =   10
      Top             =   240
      Width           =   855
   End
   Begin VB.TextBox Text5 
      DataField       =   "电路"
      DataSource      =   "Adodc1"
      Height          =   270
      Left            =   2040
      TabIndex        =   9
      Top             =   1680
      Width           =   975
   End
   Begin VB.TextBox Text4 
      DataField       =   "外语"
      DataSource      =   "Adodc1"
      Height          =   270
      Left            =   2040
      TabIndex        =   8
      Top             =   1320
      Width           =   975
   End
   Begin VB.TextBox Text3 
      DataField       =   "数学"
      DataSource      =   "Adodc1"
      Height          =   270
      Left            =   2040
      TabIndex        =   7
      Top             =   960
      Width           =   975
   End
   Begin VB.TextBox Text2 
      DataField       =   "姓名"
      DataSource      =   "Adodc1"
      Height          =   270
      Left            =   2040
      TabIndex        =   6
      Top             =   600
      Width           =   975
   End
   Begin VB.TextBox Text1 
      DataField       =   "学号"
      DataSource      =   "Adodc1"
      Height          =   270
      Left            =   2040
      TabIndex        =   5
      Top             =   240
      Width           =   975
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   375
      Left            =   960
      Top             =   2400
      Width           =   3015
      _ExtentX        =   5318
      _ExtentY        =   661
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   2
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   "Provider=Microsoft.Jet.OLEDB.3.51;Persist Security Info=False;Data Source=G:\file\工作\VB\实验\StudentAd.mdb"
      OLEDBString     =   "Provider=Microsoft.Jet.OLEDB.3.51;Persist Security Info=False;Data Source=G:\file\工作\VB\实验\StudentAd.mdb"
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   "Score"
      Caption         =   "学生成绩"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin VB.Label Label5 
      Caption         =   "电路"
      Height          =   255
      Left            =   720
      TabIndex        =   4
      Top             =   1680
      Width           =   1095
   End
   Begin VB.Label Label4 
      Caption         =   "外语"
      Height          =   255
      Left            =   720
      TabIndex        =   3
      Top             =   1320
      Width           =   1095
   End
   Begin VB.Label Label3 
      Caption         =   "数学"
      Height          =   255
      Left            =   720
      TabIndex        =   2
      Top             =   960
      Width           =   1095
   End
   Begin VB.Label Label2 
      Caption         =   "姓名"
      Height          =   255
      Left            =   720
      TabIndex        =   1
      Top             =   600
      Width           =   1095
   End
   Begin VB.Label Label1 
      Caption         =   "学号"
      Height          =   255
      Left            =   720
      TabIndex        =   0
      Top             =   240
      Width           =   1095
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub Command1_Click()
    Adodc1.Recordset.AddNew
End Sub

Private Sub Command2_Click()
    Dim msg
    msg = MsgBox("要删除吗?", vbYesNo, "删除记录")
    If msg = vbYes Then
        Adodc1.Recordset.Delete
        Adodc1.Recordset.MoveLast
    End If
End Sub

Private Sub Command3_Click()
    Adodc1.Recordset.Update
End Sub

Private Sub Command4_Click()
    Dim n As Integer
    n = Val(InputBox("请输入移动记录数", "移动记录"))
    If n = 0 Then
        Exit Sub
    Else
        Adodc1.Recordset.Move n
        If Adodc1.Recordset.EOF Then
            MsgBox "移动出界!", vbOKOnly, "移动"
            Adodc1.Recordset.MoveLast
        End If
    End If
    End Sub

⌨️ 快捷键说明

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