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

📄 frmmenu.frm

📁 This project is developed for school management system in vb and sql server 2000. All source code in
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmMenu 
   Caption         =   "Form1"
   ClientHeight    =   2445
   ClientLeft      =   165
   ClientTop       =   735
   ClientWidth     =   4380
   LinkTopic       =   "Form1"
   ScaleHeight     =   2445
   ScaleWidth      =   4380
   StartUpPosition =   3  'Windows Default
   Begin VB.CommandButton Command1 
      Caption         =   "Command1"
      Height          =   375
      Left            =   1500
      TabIndex        =   0
      Top             =   1320
      Width           =   1335
   End
   Begin VB.Menu mnuGrid 
      Caption         =   "GridDel"
      Begin VB.Menu mnuDel 
         Caption         =   "&Delete Record"
         Shortcut        =   {DEL}
      End
      Begin VB.Menu se 
         Caption         =   "-"
      End
      Begin VB.Menu mnuCancel 
         Caption         =   "Cancel Menu"
      End
   End
End
Attribute VB_Name = "frmMenu"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
 With DE.rsrptFinalResult_Grouping
  If .State = 1 Then .Close
   Call DE.rptFinalResult_Grouping(1011, 1)
   rptFinalResult.Show
 End With

End Sub

Public Sub mnuDel_Click()
   Dim Rs As New ADODB.Recordset
   With frmSubject.MainGrid
       p = .TextMatrix(.Row, 0)
     If Rs.State = 1 Then Rs.Close
      Rs.CursorLocation = adUseClient
      Rs.Open "select course_id from course where course_name ='" & p & "'", frmMain.Cn, adOpenDynamic, adLockOptimistic
      N = Rs(0)
      d = Val(frmSubject.lblSub_ID.Caption)
    M = MsgBox("Are  you sure you want to delete the record", vbYesNo, App.Comments)
    Rs.Close
    Rs.Open "Select * from sub_course where sub_id = " & d
     If Rs.RecordCount = 1 Then
      MsgBox "There Must be one related recored to course in database ,can't be deleted", vbInformation, App.Comments
      Exit Sub
     End If
    If M = vbYes Then
        frmMain.Cn.Execute "Delete from sub_course where sub_id= " & d & " And course_id =" & N
    End If
    frmSubject.SetMainGrid
   End With
End Sub

⌨️ 快捷键说明

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