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

📄 frmedit.frm

📁 ds学生学籍管理系统 有源代码等 是开发软件得好途径
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmEdit 
   Caption         =   "操作记录"
   ClientHeight    =   5700
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   6660
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   ScaleHeight     =   5700
   ScaleWidth      =   6660
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command3 
      Caption         =   "取消"
      Height          =   375
      Left            =   3960
      TabIndex        =   17
      Top             =   4920
      Width           =   1095
   End
   Begin VB.CommandButton Command2 
      Caption         =   "更新"
      Height          =   375
      Left            =   2640
      TabIndex        =   16
      Top             =   4920
      Width           =   1095
   End
   Begin VB.CommandButton Command1 
      Caption         =   "修改"
      Height          =   375
      Left            =   1320
      TabIndex        =   15
      Top             =   4920
      Width           =   1095
   End
   Begin VB.TextBox Text1 
      Enabled         =   0   'False
      Height          =   375
      Left            =   1200
      TabIndex        =   6
      Text            =   "Text1"
      Top             =   1200
      Width           =   1215
   End
   Begin VB.TextBox Text2 
      Enabled         =   0   'False
      Height          =   375
      Left            =   3960
      TabIndex        =   5
      Text            =   "Text1"
      Top             =   1200
      Width           =   1215
   End
   Begin VB.TextBox Text3 
      Enabled         =   0   'False
      Height          =   375
      Left            =   1200
      TabIndex        =   4
      Text            =   "Text1"
      Top             =   2160
      Width           =   1935
   End
   Begin VB.TextBox Text4 
      Enabled         =   0   'False
      Height          =   375
      Left            =   3960
      TabIndex        =   3
      Text            =   "Text1"
      Top             =   2160
      Width           =   1215
   End
   Begin VB.TextBox Text5 
      Enabled         =   0   'False
      Height          =   375
      Left            =   1200
      TabIndex        =   2
      Text            =   "Text1"
      Top             =   3000
      Width           =   1935
   End
   Begin VB.TextBox Text6 
      Enabled         =   0   'False
      Height          =   375
      Left            =   3960
      TabIndex        =   1
      Text            =   "Text1"
      Top             =   3000
      Width           =   1215
   End
   Begin VB.TextBox Text7 
      Enabled         =   0   'False
      Height          =   375
      Left            =   1680
      TabIndex        =   0
      Text            =   "Text1"
      Top             =   3960
      Width           =   3975
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "修改学生的记录"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   15.75
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   375
      Left            =   2160
      TabIndex        =   14
      Top             =   480
      Width           =   2535
   End
   Begin VB.Label Label2 
      Caption         =   "学号:"
      Height          =   255
      Left            =   600
      TabIndex        =   13
      Top             =   1320
      Width           =   615
   End
   Begin VB.Label Label3 
      Caption         =   "姓名:"
      Height          =   255
      Left            =   3240
      TabIndex        =   12
      Top             =   1320
      Width           =   495
   End
   Begin VB.Label Label4 
      Caption         =   "班级:"
      Height          =   255
      Left            =   600
      TabIndex        =   11
      Top             =   2280
      Width           =   495
   End
   Begin VB.Label Label5 
      Caption         =   "性别:"
      Height          =   255
      Left            =   3360
      TabIndex        =   10
      Top             =   2280
      Width           =   495
   End
   Begin VB.Label Label6 
      Caption         =   "电话:"
      Height          =   255
      Left            =   600
      TabIndex        =   9
      Top             =   3120
      Width           =   495
   End
   Begin VB.Label Label7 
      Caption         =   "学分:"
      Height          =   255
      Left            =   3360
      TabIndex        =   8
      Top             =   3120
      Width           =   495
   End
   Begin VB.Label Label8 
      Caption         =   "家庭住址:"
      Height          =   255
      Left            =   600
      TabIndex        =   7
      Top             =   4080
      Width           =   855
   End
End
Attribute VB_Name = "frmEdit"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
  frmMain.Data1.Recordset.Edit
  frmMain.Data2.Recordset.Edit
  Me.Text1.Enabled = True
  Me.Text2.Enabled = True
  Me.Text3.Enabled = True
  Me.Text4.Enabled = True
  Me.Text5.Enabled = True
  Me.Text6.Enabled = True
  Me.Text7.Enabled = True
  Me.Command1.Enabled = False
End Sub

Private Sub Command2_Click()
  frmMain.Data1.Recordset.Fields("StuId").Value = Me.Text1.Text
  frmMain.Data2.Recordset.Fields("StuId").Value = Me.Text1.Text
  frmMain.Data1.Recordset.Fields("StuName").Value = Me.Text2.Text
  frmMain.Data1.Recordset.Fields("StuClass").Value = Me.Text3.Text
  frmMain.Data1.Recordset.Fields("StuSex").Value = Me.Text4.Text
  frmMain.Data2.Recordset.Fields("StuPhone").Value = Me.Text5.Text
  frmMain.Data1.Recordset.Fields("StuScore").Value = Me.Text6.Text
  frmMain.Data2.Recordset.Fields("StuAddress").Value = Me.Text7.Text
  frmMain.Data1.Recordset.Update
  frmMain.Data2.Recordset.Update
  Me.Command2.Enabled = False
  MsgBox "修改学生记录成功!!!", vbOKOnly + vbInformation, "提示..."
  frmMain.Data1.Refresh
  frmMain.Data2.Refresh
  Unload Me
End Sub

Private Sub Command3_Click()
  Unload Me
End Sub

Private Sub Form_Load()
  Me.Text1.Text = frmMain.Data1.Recordset.Fields("StuId").Value
  Me.Text2.Text = frmMain.Data1.Recordset.Fields("StuName").Value
  Me.Text3.Text = frmMain.Data1.Recordset.Fields("StuClass").Value
  Me.Text4.Text = frmMain.Data1.Recordset.Fields("StuSex").Value
  Me.Text5.Text = frmMain.Data2.Recordset.Fields("StuPhone").Value
  Me.Text6.Text = frmMain.Data1.Recordset.Fields("StuScore").Value
  Me.Text7.Text = frmMain.Data2.Recordset.Fields("StuAddress").Value
End Sub

⌨️ 快捷键说明

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