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

📄 frmaddoperation.frm

📁 网上收集的一个考试管理系统。带论文的
💻 FRM
字号:
VERSION 5.00
Begin VB.Form FrmAddOperation 
   Caption         =   "添加操作题"
   ClientHeight    =   6945
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   9390
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   ScaleHeight     =   6945
   ScaleWidth      =   9390
   StartUpPosition =   1  '所有者中心
   Begin VB.CommandButton Command1 
      Caption         =   "入库"
      Height          =   375
      Index           =   0
      Left            =   5580
      TabIndex        =   4
      Top             =   6165
      Width           =   1320
   End
   Begin VB.CommandButton Command1 
      Caption         =   "取消"
      Height          =   375
      Index           =   1
      Left            =   6975
      TabIndex        =   3
      Top             =   6165
      Width           =   1320
   End
   Begin VB.TextBox Text1 
      Appearance      =   0  'Flat
      Height          =   4830
      Index           =   0
      Left            =   1170
      TabIndex        =   1
      Top             =   1035
      Width           =   7260
   End
   Begin VB.Frame Frame1 
      Height          =   150
      Left            =   180
      TabIndex        =   0
      Top             =   675
      Width           =   8520
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      Caption         =   "题目:"
      Height          =   180
      Index           =   0
      Left            =   450
      TabIndex        =   2
      Top             =   1080
      Width           =   540
   End
   Begin VB.Image Image1 
      Height          =   480
      Left            =   315
      Picture         =   "FrmAddOperation.frx":0000
      Top             =   90
      Width           =   480
   End
End
Attribute VB_Name = "FrmAddOperation"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Rs As ADODB.Recordset
Private Sub Command1_Click(Index As Integer)
Dim rsq As ADODB.Recordset
Dim qMsg$
Dim SQL$
Select Case Index
       Case 0
          If Text1(0).Text = Empty Then
             MsgBox "请填写完整信息", vbInformation, "提示"
             Text1(i).SetFocus
             Exit Sub
           End If
       
         DBName = ChoiceExerciseDB
         SQL = "select * from OperationExercise Where Subject= '" & Text1(0).Text & "'"
         

          Set rsq = executeSQL(SQL, qMsg, DBName)
       
          If qMsg = "查询正确" Then
             MsgBox "已经有此题目", vbInformation, "提示"
             Set rsq = Nothing
             Exit Sub
          End If
             Set rsq = Nothing
         Rs.AddNew
            Rs.Fields(0) = Text1(0).Text
            Rs.Update
            If MsgBox("题目添加成功,是否继续添加", vbInformation + vbYesNo, "成功") = vbYes Then
                Text1(0).Text = Empty
            Else
               Set Rs = Nothing
               Unload Me
            End If
            
       Case 1
         Me.Hide
End Select

End Sub

Private Sub Form_Load()
Dim Msg$
Dim SQL$
DBName = ChoiceExerciseDB
SQL = "select * from OperationExercise"

Set Rs = executeSQL(SQL, Msg, DBName)


End Sub

⌨️ 快捷键说明

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