?? module2.bas
字號:
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
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -