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

📄 frmbaseinputnew.frm

📁 教务管理系统,用VB 完成,以SQL SERVER 2000作为后台数据库
💻 FRM
📖 第 1 页 / 共 5 页
字号:
      Height          =   270
      Left            =   7155
      TabIndex        =   45
      Top             =   795
      Width           =   615
   End
   Begin VB.Label Label7 
      Alignment       =   1  'Right Justify
      BackStyle       =   0  'Transparent
      Caption         =   "户口属性"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   14.4
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FFFFFF&
      Height          =   300
      Left            =   4260
      TabIndex        =   44
      Top             =   720
      Width           =   1245
   End
   Begin VB.Label Label6 
      Alignment       =   2  'Center
      BackStyle       =   0  'Transparent
      Caption         =   "院系"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   14.4
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FFFFFF&
      Height          =   300
      Left            =   2160
      TabIndex        =   43
      Top             =   720
      Width           =   675
   End
   Begin VB.Label Label5 
      BackStyle       =   0  'Transparent
      Caption         =   "民族"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   14.4
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FFFFFF&
      Height          =   300
      Left            =   90
      TabIndex        =   42
      Top             =   705
      Width           =   675
   End
   Begin VB.Label Label4 
      Alignment       =   1  'Right Justify
      BackStyle       =   0  'Transparent
      Caption         =   "性别"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   14.4
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FFFFFF&
      Height          =   270
      Left            =   7155
      TabIndex        =   41
      Top             =   255
      Width           =   615
   End
   Begin VB.Label Label3 
      Alignment       =   1  'Right Justify
      BackStyle       =   0  'Transparent
      Caption         =   "出生年月"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   14.4
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FFFFFF&
      Height          =   300
      Left            =   4260
      TabIndex        =   40
      Top             =   225
      Width           =   1245
   End
   Begin VB.Label Label2 
      Alignment       =   2  'Center
      BackStyle       =   0  'Transparent
      Caption         =   "姓名"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   14.4
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FFFFFF&
      Height          =   300
      Left            =   2160
      TabIndex        =   39
      Top             =   225
      Width           =   675
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "学号"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   14.4
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FFFFFF&
      Height          =   300
      Left            =   90
      TabIndex        =   38
      Top             =   240
      Width           =   675
   End
   Begin VB.Shape Shape1 
      FillColor       =   &H00C00000&
      FillStyle       =   0  'Solid
      Height          =   3105
      Left            =   90
      Shape           =   4  'Rounded Rectangle
      Top             =   90
      Width           =   9345
   End
   Begin VB.Shape Shape2 
      FillColor       =   &H00C00000&
      FillStyle       =   0  'Solid
      Height          =   2175
      Left            =   90
      Shape           =   4  'Rounded Rectangle
      Top             =   3240
      Width           =   9345
   End
   Begin VB.Menu MNU1 
      Caption         =   "文件[&F]"
      Begin VB.Menu MNU11 
         Caption         =   "退出[&X]"
      End
   End
   Begin VB.Menu MNU2 
      Caption         =   "数据操作[&F]"
      Begin VB.Menu MNU21 
         Caption         =   "记录添加[&A]"
      End
      Begin VB.Menu MNU22 
         Caption         =   "数据删除[&D]"
      End
   End
   Begin VB.Menu MNU3 
      Caption         =   "记录翻看[&L]"
      Begin VB.Menu MNU31 
         Caption         =   "移至首位"
      End
      Begin VB.Menu MNU32 
         Caption         =   "移至未位"
      End
      Begin VB.Menu MNU33 
         Caption         =   "向前移位"
      End
      Begin VB.Menu MNU34 
         Caption         =   "向后移位"
      End
   End
   Begin VB.Menu MNUQH 
      Caption         =   "功能切换[&N]"
      Begin VB.Menu MNUQH1 
         Caption         =   "信息查询"
      End
      Begin VB.Menu MNUQH2 
         Caption         =   "数据统计"
      End
      Begin VB.Menu MNUQH3 
         Caption         =   "全屏修改"
      End
   End
   Begin VB.Menu MNU4 
      Caption         =   "帮助[&H]"
      Begin VB.Menu MNU41 
         Caption         =   "使用说明"
      End
   End
End
Attribute VB_Name = "frmBaseInput"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Option Explicit
Dim bModify As Boolean
Dim bQuery As Boolean
Dim bAddnew As Boolean
Dim bDelete As Boolean
Dim rec As Recordset
Dim BookMark As Integer
Dim recCount As Integer

Private Sub cboHKSX_KeyPress(KeyAscii As Integer)
Dim sqlModify As String

If KeyAscii = 13 Then
    If bModify Then
        'If MsgBox("确信要修改?", vbQuestion + vbYesNo, "删除前询问") = vbYes Then
            sqlModify = "update zbqkb set hksx='" + Trim(cboHKSX) + "' where id=" + Trim(rec!ID) + ""
            dbStudent.Execute sqlModify
        'End If
    End If
    txtBJ.SetFocus
End If
End Sub

Private Sub cboHKSX_LostFocus()
Dim sqlModify As String
    If bModify Then
        'If MsgBox("确信要修改?", vbQuestion + vbYesNo, "删除前询问") = vbYes Then
            sqlModify = "update zbqkb set hksx='" + Trim(cboHKSX) + "' where id=" + Trim(rec!ID) + ""
            dbStudent.Execute sqlModify
        'End If
    End If
End Sub

Private Sub cboMZ_KeyPress(KeyAscii As Integer)
Dim sqlModify As String
If KeyAscii = 13 Then
    If bModify Then
        'If MsgBox("确信要修改?", vbQuestion + vbYesNo, "删除前询问") = vbYes Then
            sqlModify = "update zbqkb set mz='" + Trim(cboMZ) + "' where id=" + Trim(rec!ID) + ""
            dbStudent.Execute sqlModify
       ' End If
    End If
    cboYX.SetFocus
End If
End Sub

Private Sub cboMZ_LostFocus()
Dim sqlModify As String
    If bModify Then
        'If MsgBox("确信要修改?", vbQuestion + vbYesNo, "删除前询问") = vbYes Then
            sqlModify = "update zbqkb set mz='" + Trim(cboMZ) + "' where id=" + Trim(rec!ID) + ""
            dbStudent.Execute sqlModify
        'End If
    End If
End Sub

Private Sub cboNJ_KeyPress(KeyAscii As Integer)
Dim sqlModify As String
If KeyAscii = 13 Then
    If bModify Then
        'If MsgBox("确信要修改?", vbQuestion + vbYesNo, "删除前询问") = vbYes Then
            sqlModify = "update zbqkb set nj='" + Trim(cboNJ) + "' where id=" + Trim(rec!ID) + ""
            dbStudent.Execute sqlModify
        'End If
    End If
    cboSY.SetFocus
End If
End Sub

Private Sub cboNJ_LostFocus()
Dim sqlModify As String
    If bModify Then
        'If MsgBox("确信要修改?", vbQuestion + vbYesNo, "删除前询问") = vbYes Then
            sqlModify = "update zbqkb set nj='" + Trim(cboNJ) + "' where id=" + Trim(rec!ID) + ""
            dbStudent.Execute sqlModify
       ' End If
    End If
    
    End Sub

Private Sub cboPYFS_KeyPress(KeyAscii As Integer)
Dim sqlModify As String
If KeyAscii = 13 Then
    If bModify Then
        'If MsgBox("确信要修改?", vbQuestion + vbYesNo, "删除前询问") = vbYes Then
            sqlModify = "update zbqkb set pyfs='" + Trim(cboPYFS) + "' where id=" + Trim(rec!ID) + ""
            dbStudent.Execute sqlModify
        'End If
    End If
    txtSFZHM.SetFocus
End If
End Sub

Private Sub cboPYFS_LostFocus()
Dim sqlModify As String
    If bModify Then
        'If MsgBox("确信要修改?", vbQuestion + vbYesNo, "删除前询问") = vbYes Then
            sqlModify = "update zbqkb set pyfs='" + Trim(cboPYFS) + "' where id=" + Trim(rec!ID) + ""
            dbStudent.Execute sqlModify
        'End If
    End If
End Sub

Private Sub cboSY_KeyPress(KeyAscii As Integer)
Dim sqlModify As String
If KeyAscii = 13 Then
    If bModify Then
        'If MsgBox("确信要修改?", vbQuestion + vbYesNo, "删除前询问") = vbYes Then
            sqlModify = "update zbqkb set sy='" + Trim(cboSY) + "' where id=" + Trim(rec!ID) + ""
            dbStudent.Execute sqlModify
        'End If
    End If
    cboZZMM.SetFocus
End If
End Sub

Private Sub cboSY_LostFocus()
Dim sqlModify As String
    If bModify Then
        'If MsgBox("确信要修改?", vbQuestion + vbYesNo, "删除前询问") = vbYes Then
            sqlModify = "update zbqkb set sy='" + Trim(cboSY) + "' where id=" + Trim(rec!ID) + ""
            dbStudent.Execute sqlModify
       'End If
    End If
    
End Sub

Private Sub cboXB_KeyPress(KeyAscii As Integer)
Dim sqlModify As String
If KeyAscii = 13 Then
    If bModify Then
       ' If MsgBox("确信要修改?", vbQuestion + vbYesNo, "删除前询问") = vbYes Then
            sqlModify = "update zbqkb set xb='" + Trim(cboXB) + "' where id=" + Trim(rec!ID) + ""
            dbStudent.Execute sqlModify
        'End If
    End If
    
    cboMZ.SetFocus
End If
End Sub

Private Sub cboXB_LostFocus()
Dim sqlModify As String
    If bModify Then
        'If MsgBox("确信要修改?", vbQuestion + vbYesNo, "删除前询问") = vbYes Then
            sqlModify = "update zbqkb set xb='" + Trim(cboXB) + "' where id=" + Trim(rec!ID) + ""
            dbStudent.Execute sqlModify
       ' End If
    End If
    
    
End Sub

Private Sub cboXL_KeyPress(KeyAscii As Integer)
Dim sqlModify As String

If KeyAscii = 13 Then

    If bModify Then
        'If MsgBox("确信要修改?", vbQuestion + vbYesNo, "删除前询问") = vbYes Then
            sqlModify = "update zbqkb set xl='" + Trim(cboXL) + "' where id=" + Trim(rec!ID) + ""
            dbStudent.Execute sqlModify
       ' End If
    End If
    
    txtTC.SetFocus
End If
End Sub


Private Sub cboXL_LostFocus()
Dim sqlModify As String


    If bModify Then
        'If MsgBox("确信要修改?", vbQuestion + vbYesNo, "删除前询问") = vbYes Then
            sqlModify = "update zbqkb set xl='" + Trim(cboXL) + "' where id=" + Trim(rec!ID) + ""
            dbStudent.Execute sqlModify
        'End If
    End If
    

End Sub

Private Sub cboYX_KeyPress(KeyAscii As Integer)
Dim sqlModify As String
If KeyAscii = 13 Then
    If bModify Then
        'If MsgBox("确信要修改?", vbQuestion + vbYesNo, "删除前询问") = vbYes Then
            sqlModify = "update zbqkb set yx='" + Trim(cboYX) + "' where id=" + Trim(rec!ID) + ""
            dbStudent.Execute sqlModify
       ' End If
    End If
    
    cboHKSX.SetFocus
End If
End Sub

Private Sub cboYX_LostFocus()
Dim sqlModify As String
    If bModify Then
        'If MsgBox("确信要修改?", vbQuestion + vbYesNo, "删除前询问") = vbYes Then
            sqlModify = "update zbqkb set yx='" + Trim(cboYX) + "' where id=" + Trim(rec!ID) + ""
            dbStudent.Execute sqlModify
       ' End If
        

⌨️ 快捷键说明

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