【文章內容簡介】
en a, conn, 3, 1If = 0 Then MsgBox 不存在該專業(yè)代碼,請您正確輸入專業(yè)代碼! Exit SubEnd Ifa = select * from 班級 where 班級代碼=39。 amp。 Combo3 amp。 39。If = 1 Then a, conn, 3, 1If = 0 Then MsgBox 不存在該班級代碼,請您輸入正確的班級代碼! Exit SubEnd Ifa = select * from 性別 where 性別=39。 amp。 Combo4 amp。 39。If = 1 Then a, conn, 3, 1If = 0 Then MsgBox 不存在該性別,請您輸入正確的性別! Exit SubEnd Ifa = select * from 班級 where 班級代碼=39。 amp。 Combo3 amp。 39。 and 專業(yè)代碼=39。 amp。 Combo2 amp。 39。 and 系部代碼=39。 amp。 Combo1 amp。 39。If = 1 Then a, conn, 3, 1If = 0 ThenMsgBox 你輸入的學號和您選擇的班級、專業(yè)、系部不符合,請從新輸入!Exit SubEnd Ifa = select * from 學生 where 學號=39。 amp。 Text4 amp。 39。If = 1 Then a, conn, 3, 1If 0 Then i = MsgBox(您確認要修改該學生的資料嗎?修改后該記錄的全部資料將以當前的資料為準!, 1 + vbExclamation, 學生資料修改) If i = 1 Then a = update 學生 set 民族=39。 amp。 Text1 amp。 39。,政治面貌=39。 amp。 Text2 amp。 39。,家庭地址=39。 amp。 Text3 amp。 39。,出生日期=39。 amp。 Text7 amp。 39。,姓名=39。 amp。 Text5 amp。 39。,入學時間=39。 amp。 Text8 amp。 ,聯(lián)系電話=39。 amp。 Text9 amp。 39。,性別=39。 amp。 Combo4 amp。 39。,系部代碼=39。 amp。 Combo1 amp。 39。,專業(yè)代碼=39。 amp。 Combo2 amp。 39。,班級代碼=39。 amp。 Combo3 amp。 39。where 學號=39。 amp。 Text4 amp。 39。 If = 1 Then a, conn, 3, 1 MsgBox 恭喜您!修改成功! Unload Me End IfElse Combo1 = 請選擇 Combo2 = 請選擇 Combo3 = 請選擇 Combo4 = 請選擇 Text1 = Text1 = Text3 = Text4 = Text5 = Text7 = Text8 = Text9 = Exit SubEnd IfEnd SubPrivate Sub Form_Load()a = select 系部代碼 from 系部If = 1 Then a, conn, 3, 1If 0 Then For i = 0 To 1 rs(系部代碼) NextEnd Ifa = select 專業(yè)代碼 from 專業(yè)If = 1 Then a, conn, 3, 1If 0 Then For i = 0 To 1 rs(專業(yè)代碼) NextEnd Ifa = select 班級代碼 from 班級If = 1 Then a, conn, 3, 1If 0 Then For i = 0 To 1 rs(班級代碼) NextEnd Ifa = select 性別 from 性別If = 1 Then a, conn, 3, 1If 0 Then For i = 0 To 1 rs(性別) NextEnd IfCombo1 = 請選擇Combo2 = 請選擇Combo3 = 請選擇Combo4 = 請選擇Text1 = Text2 = Text3 = Text4 = Text5 = Text7 = Text8 = Text9 = End SubPrivate Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)b = Nowc = select max(序號) from 登陸記錄 where 用戶名=39。 amp。 用戶名 amp。 39。If = 1 Then c, conn, 3, 1 d = rs(0)a = update 登陸記錄 set 退出時間=39。 amp。 b amp。 39。 where 序號=39。 amp。 d amp。 39。If = 1 Then a, conn, 3, 1End SubPrivate Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)b = Nowc = select max(序號) from 登陸記錄 where 用戶名=39。 amp。 用戶名 amp。 39。If = 1 Then c, conn, 3, 1 d = rs(0)a = update 登陸記錄 set 退出時間=39。 amp。 b amp。 39。 where 序號=39。 amp。 d amp。 39。If = 1 Then a, conn, 3, 1End SubPrivate Sub Command1_Click()Combo1 = LTrim$()Combo1 = RTrim$()d = select * from V專業(yè) where 系部名稱=39。 amp。 Combo1 amp。 39。 If = 1 Then d, conn, 3, 1 If = 0 Then MsgBox 無法找到你所要找的信息! Exit Sub Else Set = rs End IfEnd SubPrivate Sub Command3_Click() 1End SubPrivate Sub Command4_Click() 1End SubPrivate Sub Command5_Click() 1End SubPrivate Sub Command6_Click()Unload MeEnd SubPrivate Sub DataGrid1_Click()End SubPrivate Sub Form_Load()b = select 系部名稱 from 系部If = 1 Then b, conn, 3, 1If 0 Then For i = 0 To 1 rs(系部名稱) NextEnd Ifd = select * from 系部 If = 1 Then d, conn, 3, 1 Set = rsSelect Case qx Case 1 = True = True = True Case 2: = True = True = True Case 3 = False = False = False Case Else = False = False = False End SelectCombo1 = 請選擇End SubPrivate Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)b = Nowc = select max(序號) from 登陸記錄 where 用戶名=39。 amp。 用戶名 amp。 39。If = 1 Then c, conn, 3, 1 d = rs(0)a = update 登陸記錄 set 退出時間=39。 amp。 b amp。 39。 where 序號=39。 amp。 d amp。 39。If = 1 Then a, conn, 3, 1End SubPrivate Sub Command1_Click()If Text1 = Then MsgBox 請您輸入系部代碼! Exit SubEnd IfText1 = LTrim$()Text1 = RTrim$()If Len(Text1) 4 Then MsgBox 您輸入的系部代碼過長,請從新輸入4個字符以內的系部代碼! Text1 = Exit SubEnd IfIf Text2 = Then MsgBox 請輸入系部名稱! Exit SubEnd IfText2 = LTrim$()Text2 = RTrim$()If Len(Text2) 30 Then MsgBox 您輸入的系部名稱過長,請從新輸入30個字符以內的系部名稱! Text2 = Exit SubEnd IfText3 = LTrim$()Text3 = RTrim$()If Len(Text2) 10 Then MsgBox 您輸入的系名稱過長,請從新輸入10個字符以內的系主任名稱! Text3 = Exit SubEnd IfText4 = LTrim$()Text4 = RTrim$()If Len(Text4) 12 Then MsgBox 您輸入的系部電話過長,請從新輸入12個字符以內的系部電話! Text4 = Exit SubEnd Ifa = select * from 系部 where 系部代碼=39。 amp。 Text1 amp。 39。If = 1 Then a, conn, 3, 1If 0 Then MsgBox 該系部已經存在請從新輸入! Text1 = Exit SubElse i = MsgBox(您確認要添加該系部嗎?, 1 + vbExclamation, 添加系部記錄) If i =