mrc.Close
txtSQL = "select * from class_Info where class_No = '" & comboClassno.Text & "'"
Set mrc = ExecuteSQL(txtSQL, MsgText)
Grade = mrc!Grade
mrc.Close
txtSQL = "select * from gradecourse_Info where grade = '" & Grade & "'"
Set mrc = ExecuteSQL(txtSQL, MsgText)
While (mrc.EOF = False)
comboCourse.AddItem mrc!course_Name
mrc.MoveNext
Wend
mrc.Close
Flagselect = True
End Sub
Private Sub comboCourseno_Change()
End Sub
Private Sub comboSID_Click()
Dim mrc As ADODB.Recordset
Dim txtSQL As String
Dim MsgText As String
txtSQL = "select * from student_Info where student_ID = '" & comboSID.Text & "'"
Set mrc = ExecuteSQL(txtSQL, MsgText)
txtName.Text = mrc!student_Name
mrc.Close
End Sub
Private Sub Form_Load()
Dim mrc As ADODB.Recordset
Dim txtSQL As String
Dim MsgText As String
Flagselect = False
txtSQL = "select * from class_Info "
Set mrc = ExecuteSQL(txtSQL, MsgText)
While (mrc.EOF = False)
comboClassno.AddItem mrc!class_No
mrc.MoveNext
Wend
mrc.Close
comboExamtype.AddItem "2000期中"
comboExamtype.AddItem "2000期末"
comboExamtype.AddItem "2001期中"
comboExamtype.AddItem "2001期末"
End Sub
.........................................................................................................
.......................... frmModifyuserinfo 修改用户信息窗口代码 ................................
Private Sub cmdCancel_Click()
Unload Me
End Sub
Private Sub cmdOK_Click()
Dim txtSQL, MsgText As String
Dim mrc As ADODB.Recordset
If Trim(Text1(1).Text) <> Trim(Text1(2).Text) Then
MsgBox "密码输入不正确!", vbOKOnly + vbExclamation, "警告"
Text1(1).SetFocus
Text1(1).Text = ""
Else
txtSQL = "select * from user_Info where user_ID = '" & UserName & "'"
Set mrc = ExecuteSQL(txtSQL, MsgText)
mrc.Fields(1) = Text1(1).Text
mrc.Update
mrc.Close
MsgBox "密码修改成功!", vbOKOnly + vbExclamation, "修改密码"
Me.Hide
End If
End Sub
.........................................................................................................
............................. frmModifysinfo 修改学籍信息窗口代码 ................................
Dim mrc As ADODB.Recordset
Dim myBookmark As Variant
Dim mcclean As Boolean
Private Sub editCommand_Click()
mcclean = False
Frame2.Enabled = False
firstCommand.Enabled = False
previousCommand.Enabled = False
nextCommand.Enabled = False
lastCommand.Enabled = False
txtSID.Enabled = True
txtName.Enabled = True
comboSex.Enabled = True
txtBorndate.Enabled = True
comboClassNo.Enabled = True
txtRudate.Enabled = True
txtTel.Enabled = True
txtAddress.Enabled = True
txtComment.Enabled = True
myBookmark = mrc.Bookmark
End Sub
Private Sub cancelCommand_Click()
If Not mcclean Then
Frame2.Enabled = True
firstCommand.Enabled = True
previousCommand.Enabled = True
nextCommand.Enabled = True
lastCommand.Enabled = True
txtSID.Enabled = False
txtName.Enabled = False
comboSex.Enabled = False
txtBorndate.Enabled = False
comboClassNo.Enabled = False
txtRudate.Enabled = False
txtTel.Enabled = False
txtAddress.Enabled = False
txtComment.Enabled = False
mrc.Bookmark = myBookmark
Call viewData
Else
MsgBox "什么都没有修改,有什么好取消的!", vbOKOnly + vbExclamation, "警告"
End If
End Sub
Private Sub deleteCommand_Click()
myBookmark = mrc.Bookmark
str2$ = MsgBox("是否删除当前记录?", vbOKCancel, "删除当前记录")
If str2$ = vbOK Then
mrc.MoveNext
If mrc.EOF Then
mrc.MoveFirst
myBookmark = mrc.Bookmark
mrc.MoveLast
mrc.Delete
mrc.Bookmark = myBookmark
Call viewData
Else
myBookmark = mrc.Bookmark
mrc.MovePrevious
mrc.Delete
mrc.Bookmark = myBookmark
Call viewData
End If
Else
mrc.Bookmark = myBookmark
Call viewData
End If
End Sub
<< 上一页 [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] ... 下一页 >>