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

📄 modifydeletescore.frm

📁 希望给大家看看,能有点启发,是关于一个学生档案管理系统的文档.
💻 FRM
字号:
VERSION 5.00
Begin VB.Form ModifyDeleteScore 
   BackColor       =   &H8000000A&
   Caption         =   "修改删除学生成绩"
   ClientHeight    =   3990
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4905
   LinkTopic       =   "Form1"
   ScaleHeight     =   3990
   ScaleWidth      =   4905
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command3 
      Caption         =   "删除确认"
      Height          =   495
      Left            =   2640
      TabIndex        =   11
      Top             =   3360
      Width           =   975
   End
   Begin VB.CommandButton Command2 
      Caption         =   "返回"
      Height          =   495
      Left            =   3960
      TabIndex        =   12
      Top             =   3360
      Width           =   735
   End
   Begin VB.Data Data1 
      Connect         =   "Access"
      DatabaseName    =   "studentInformation.mdb"
      DefaultCursorType=   0  '缺省游标
      DefaultType     =   2  '使用 ODBC
      Exclusive       =   0   'False
      Height          =   345
      Left            =   0
      Options         =   0
      ReadOnly        =   0   'False
      RecordsetType   =   1  'Dynaset
      RecordSource    =   "学生成绩"
      Top             =   2880
      Visible         =   0   'False
      Width           =   3975
   End
   Begin VB.TextBox Text10 
      Height          =   375
      Left            =   3000
      TabIndex        =   9
      Top             =   2280
      Width           =   975
   End
   Begin VB.TextBox Text9 
      Height          =   375
      Left            =   960
      TabIndex        =   8
      Top             =   2280
      Width           =   855
   End
   Begin VB.TextBox Text8 
      Height          =   375
      Left            =   3000
      TabIndex        =   7
      Top             =   1740
      Width           =   975
   End
   Begin VB.TextBox Text7 
      Height          =   375
      Left            =   960
      TabIndex        =   6
      Top             =   1740
      Width           =   855
   End
   Begin VB.TextBox Text6 
      Height          =   375
      Left            =   3000
      TabIndex        =   5
      Top             =   1200
      Width           =   975
   End
   Begin VB.TextBox Text5 
      Height          =   375
      Left            =   960
      TabIndex        =   4
      Top             =   1200
      Width           =   855
   End
   Begin VB.TextBox Text4 
      Height          =   375
      Left            =   3000
      TabIndex        =   3
      Top             =   660
      Width           =   975
   End
   Begin VB.TextBox Text3 
      Height          =   375
      Left            =   960
      TabIndex        =   2
      Top             =   660
      Width           =   855
   End
   Begin VB.TextBox Text2 
      Height          =   375
      Left            =   3000
      TabIndex        =   1
      Top             =   120
      Width           =   975
   End
   Begin VB.TextBox Text1 
      Height          =   375
      Left            =   600
      TabIndex        =   0
      Top             =   120
      Width           =   1335
   End
   Begin VB.CommandButton Command1 
      Caption         =   "修改确认"
      Height          =   495
      Left            =   1320
      TabIndex        =   10
      Top             =   3360
      Width           =   975
   End
   Begin VB.Label Label10 
      BackStyle       =   0  'Transparent
      Caption         =   "体育"
      Height          =   375
      Left            =   2160
      TabIndex        =   22
      Top             =   720
      Width           =   495
   End
   Begin VB.Label Label9 
      BackStyle       =   0  'Transparent
      Caption         =   "市场营销"
      Height          =   495
      Left            =   2040
      TabIndex        =   21
      Top             =   1800
      Width           =   975
   End
   Begin VB.Label Label8 
      BackStyle       =   0  'Transparent
      Caption         =   "局域网技术"
      Height          =   495
      Left            =   0
      TabIndex        =   20
      Top             =   1800
      Width           =   975
   End
   Begin VB.Label Label7 
      BackStyle       =   0  'Transparent
      Caption         =   "操作系统"
      Height          =   495
      Left            =   2040
      TabIndex        =   19
      Top             =   1200
      Width           =   975
   End
   Begin VB.Label Label6 
      BackStyle       =   0  'Transparent
      Caption         =   "微机原理"
      Height          =   495
      Left            =   0
      TabIndex        =   18
      Top             =   1200
      Width           =   975
   End
   Begin VB.Label Label5 
      BackStyle       =   0  'Transparent
      Caption         =   "VB"
      Height          =   375
      Left            =   2160
      TabIndex        =   17
      Top             =   2280
      Width           =   495
   End
   Begin VB.Label Label4 
      BackStyle       =   0  'Transparent
      Caption         =   "ASP"
      Height          =   375
      Left            =   120
      TabIndex        =   16
      Top             =   2280
      Width           =   495
   End
   Begin VB.Label Label3 
      BackStyle       =   0  'Transparent
      Caption         =   "英语"
      Height          =   375
      Left            =   120
      TabIndex        =   15
      Top             =   720
      Width           =   495
   End
   Begin VB.Label Label2 
      BackStyle       =   0  'Transparent
      Caption         =   "姓名"
      Height          =   375
      Left            =   2160
      TabIndex        =   14
      Top             =   120
      Width           =   495
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "学号"
      Height          =   375
      Left            =   120
      TabIndex        =   13
      Top             =   120
      Width           =   495
   End
End
Attribute VB_Name = "ModifyDeleteScore"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
   Command2.Enabled = False
   Data1.RecordSource = "学生成绩"
   Data1.Recordset.Edit
   Data1.Recordset.Fields("学号") = Text1.Text
   Data1.Recordset.Fields("姓名") = Text2.Text
   Data1.Recordset.Fields("英语") = Text3.Text
   Data1.Recordset.Fields("体育") = Text4.Text
   Data1.Recordset.Fields("微机原理") = Text5.Text
   Data1.Recordset.Fields("操作系统") = Text6.Text
   Data1.Recordset.Fields("局域网技术") = Text7.Text
   Data1.Recordset.Fields("市场营销") = Text8.Text
   Data1.Recordset.Fields("ASP") = Text9.Text
   Data1.Recordset.Fields("VB") = Text10.Text
   Data1.Recordset.Update
   Data1.Refresh
   Text1.Text = "": Text2.Text = "": Text3.Text = "": Text4.Text = ""
   Text5.Text = "": Text6.Text = "": Text7.Text = "": Text8.Text = ""
   Text9.Text = "": Text10.Text = ""
   Me.Hide
  
End Sub

Private Sub Command2_Click()
  Text1.Text = "": Text2.Text = "": Text3.Text = "": Text4.Text = ""
  Text5.Text = "": Text6.Text = "": Text7.Text = "": Text8.Text = ""
  Text9.Text = "": Text10.Text = ""
  Me.Hide
 
End Sub

Private Sub Command3_Click()
   Command1.Enabled = False
   Data1.RecordSource = "学生成绩"
   Data1.Recordset.Delete
   Data1.Recordset.MoveNext
   If Data1.Recordset.EOF Then Data1.Recordset.MoveLast
   Data1.Refresh
   Text1.Text = "": Text2.Text = "": Text3.Text = "": Text4.Text = ""
   Text5.Text = "": Text6.Text = "": Text7.Text = "": Text8.Text = ""
   Text9.Text = "": Text10.Text = ""
   Me.Hide
   
End Sub

Private Sub Form_Load()
  Dim str1 As String, str As String * 11
  str1 = "你想修改或删除哪位同学的信息?" + Chr(13) + Chr(10) + "请输入此学生的学号!"
  str = InputBox(str1, "询问提示", , 100, 100)
  Data1.RecordSource = "Select * From 学生成绩 Where 学号='" & str & " ' "
  Data1.Refresh
  If Data1.Recordset.EOF Then
    MsgBox "对不起没有这个用户!", vbOKCancel + vbExclamation, "错误提示"
    Data1.RecordSource = "学生成绩"
    Data1.Refresh
  Else
    Data1.RecordSource = "学生成绩"
    
    Text1.Text = Data1.Recordset.Fields("学号")
    Text2.Text = Data1.Recordset.Fields("姓名")
    Text3.Text = Data1.Recordset.Fields("英语")
    Text4.Text = Data1.Recordset.Fields("体育")
    Text5.Text = Data1.Recordset.Fields("微机原理")
    Text6.Text = Data1.Recordset.Fields("操作系统")
    Text7.Text = Data1.Recordset.Fields("局域网技术")
    Text8.Text = Data1.Recordset.Fields("市场营销")
    Text9.Text = Data1.Recordset.Fields("ASP")
    Text10.Text = Data1.Recordset.Fields("VB")
    
    Data1.Refresh
  End If
End Sub

⌨️ 快捷键说明

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