module2.bas
来自「学籍管理系统 建立学生学籍管理系统」· BAS 代码 · 共 61 行
BAS
61 行
Attribute VB_Name = "Module2"
Public Function Check1()
Dim txtSQL As String
Dim MsgText As String
Dim MRC As ADODB.Recordset
txtSQL = "SELECT * FROM DEPARTMENT WHERE DeptID>0"
Set MRC = ExecuteSQL(txtSQL, MsgText)
If (MRC.EOF) Then
frmMain.que_major.Enabled = False
frmMain.mod_dept.Enabled = False
frmMain.adm_major.Enabled = False
frmMain.adm_stu.Enabled = False
frmMain.adm_teacher.Enabled = False
End If
End Function
Public Function Check2()
Dim txtSQL As String
Dim MsgText As String
Dim MRC As ADODB.Recordset
txtSQL = "SELECT * FROM MAJOR"
Set MRC = ExecuteSQL(txtSQL, MsgText)
If (MRC.EOF) Then
frmMain.mod_major.Enabled = False
frmMain.que_major.Enabled = False
frmMain.adm_stu.Enabled = False
frmMain.adm_teacher.Enabled = False
End If
End Function
Public Function Check3()
Dim txtSQL As String
Dim MsgText As String
Dim MRC As ADODB.Recordset
txtSQL = "SELECT * FROM STUDENTINFO"
Set MRC = ExecuteSQL(txtSQL, MsgText)
If (MRC.EOF) Then
frmMain.mod_stu.Enabled = False
frmMain.que_stu.Enabled = False
End If
End Function
Public Function Check4()
Dim txtSQL As String
Dim MsgText As String
Dim MRC As ADODB.Recordset
txtSQL = "SELECT * FROM USERINFO"
Set MRC = ExecuteSQL(txtSQL, MsgText)
If (MRC.EOF) Then
frmMain.mod_teacher.Enabled = False
frmMain.que_teacher.Enabled = False
End If
End Function
Public Function Check5()
Dim txtSQL As String
Dim MsgText As String
Dim MRC As ADODB.Recordset
txtSQL = "SELECT * FROM USERLOGIN WHERE SystemName='Student'"
Set MRC = ExecuteSQL(txtSQL, MsgText)
If (MRC.EOF) Then
frmMain.adm_user.Enabled = False
End If
End Function
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?