?? frminput.frm
字號:
TabIndex = 9
Top = 1920
Width = 1095
End
Begin VB.Label Label1
BackColor = &H00C0C0C0&
Caption = "院系:"
BeginProperty Font
Name = "宋體"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Index = 8
Left = 120
TabIndex = 8
Top = 2640
Width = 1215
End
Begin VB.Label Label1
BackColor = &H00C0C0C0&
Caption = "電話號碼:"
BeginProperty Font
Name = "宋體"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Index = 7
Left = 2880
TabIndex = 7
Top = 2640
Width = 1095
End
Begin VB.Label Label1
BackColor = &H00C0C0C0&
Caption = "專業(yè):"
BeginProperty Font
Name = "宋體"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Index = 6
Left = 5880
TabIndex = 6
Top = 1920
Width = 1095
End
Begin VB.Label Label1
BackColor = &H00C0C0C0&
Caption = "出生年月:"
BeginProperty Font
Name = "宋體"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Index = 5
Left = 2880
TabIndex = 5
Top = 1080
Width = 1095
End
Begin VB.Label Label1
BackColor = &H00C0C0C0&
Caption = "民族:"
BeginProperty Font
Name = "宋體"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Index = 4
Left = 8040
TabIndex = 4
Top = 360
Width = 855
End
Begin VB.Label Label1
BackColor = &H00C0C0C0&
Caption = "地址:"
BeginProperty Font
Name = "宋體"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Index = 3
Left = 5880
TabIndex = 3
Top = 1080
Width = 1095
End
Begin VB.Label Label1
BackColor = &H00C0C0C0&
Caption = "父母姓名:"
BeginProperty Font
Name = "宋體"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Index = 2
Left = 120
TabIndex = 2
Top = 1080
Width = 1095
End
Begin VB.Label Label1
BackColor = &H00C0C0C0&
Caption = "性別:"
BeginProperty Font
Name = "宋體"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Index = 1
Left = 5880
TabIndex = 1
Top = 360
Width = 1095
End
Begin VB.Label Label1
BackColor = &H00C0C0C0&
Caption = "名字:"
BeginProperty Font
Name = "宋體"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Index = 0
Left = 2880
TabIndex = 0
Top = 360
Width = 975
End
End
Attribute VB_Name = "FrmView"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim rs As ADODB.Recordset
Dim rs1 As ADODB.Recordset
Dim txtSQL As String
Dim MsgText As String
Dim mybookmark As Variant
Dim mcclean As Boolean
'Private Sub Combo1_Change()
'Combo1.AddItem "男"
'Combo1.AddItem "女"
'End Sub
Private Sub Command1_Click()
On Error GoTo errh
If Combo4.Text <> "" Then
If Combo2.Text <> "" Then
If Text1.Text <> "" Then
If Text13.Text <> "" Then
If Combo3.Text <> "" Then
If checkclass Then
If checkcourse Then
If match = True Then
Adodc1.Recordset.AddNew
Adodc1.Recordset.Fields("課程號").Value = Combo4.Text
Adodc1.Recordset.Fields("學號").Value = Text1.Text
Adodc1.Recordset.Fields("成績").Value = Text13.Text
Adodc1.Recordset.Fields("課程名稱").Value = Combo2.Text
Adodc1.Recordset.Fields("備注").Value = Combo3.Text
Adodc1.Recordset.Update
MsgBox "添加成功!"
Combo4.Text = ""
Combo2.Text = ""
Combo3.Text = ""
'Text2.Text = ""
Text13.Text = ""
Else
MsgBox "成績和備注不匹配,請核對!"
End If
Else
MsgBox "沒有這個課程,不能添加!"
Combo3.Text = ""
Text13.Text = ""
Combo4.Text = ""
Combo2.Text = ""
Combo4.SetFocus
End If
Else
MsgBox "這個成績已經(jīng)有了,不能再添加!"
End If
Else
MsgBox "備注不能為空,請輸入備注!"
Combo3.SetFocus
End If
Else
MsgBox "成績不能為空,請輸入成績!"
Text13.SetFocus
End If
Else
MsgBox "學號不能為空,請輸入學號!"
Text1.SetFocus
End If
Else
MsgBox "課程名稱不能為空,請輸入課程名稱!"
Combo2.SetFocus
End If
Else
MsgBox "課程號不能為空,請輸入課程號!"
Combo4.SetFocus
End If
Exit Sub
errh:
MsgBox Err.Description
End Sub
Private Sub CmdBolish_Click()
On Error GoTo AddErr
If Not mcclean Then
Command2.Enabled = True
Command3.Enabled = True
Command4.Enabled = True
Command5.Enabled = True
Command10.Enabled = True
'Text1.Enabled = False
'Text2.Enabled = False
'Text3.Enabled = False
'Text4.Enabled = False
'Text5.Enabled = False
'Text6.Enabled = False
'Text7.Enabled = False
'Text8.Enabled = False
'Text9.Enabled = False
'Combo1.Enabled = False
'DataCombo1.Enabled = False
'Text10.Enabled = False
'Text12.Enabled = False
' Adodc2.Recordset.Bookmark = mybookmark
Else
MsgBox "什么也沒修改,無所謂取消不取消!", vbOKOnly + vbExclamation, "警告"
End If
Exit Sub
AddErr:
MsgBox Err.Description
End Sub
Private Sub CmdUpdata_Click()
If mcclean = True Then
MsgBox "請先修改學籍信息", vbOKOnly + vbExclamation, "警告"
Exit Sub
Else
If Text1.Text = "" Then
MsgBox "請輸入學號!", vbOKOnly + vbExclamation, "警告"
Text1.SetFocus
Exit Sub
End If
If Text2.Text = "" Then
MsgBox "請輸入名字!", vbOKOnly + vbExclamation, "警告"
Text2.SetFocus
Exit Sub
End If
If Combo1.Text = "" Then
MsgBox "請輸入性別!", vbOKOnly + vbExclamation, "警告"
Combo1.SetFocus
Exit Sub
End If
If Text5.Text = "" Then
MsgBox "請輸入民族!"
Text5.SetFocus
Exit Sub
End If
If Text6.Text = "" Then
MsgBox "請輸入父母姓名!", vbOKOnly + vbExclamation, "警告"
Text6.SetFocus
Exit Sub
End If
If Text4.Text = "" Then
MsgBox "請輸入出生年月!出生年月應輸入日期格式(YYYY-MM-DD)!", vbOKOnly + vbExclamation, "警告"
Text4.SetFocus
Exit Sub
End If
If Text7.Text = "" Then
MsgBox "請輸入地址!", vbOKOnly + vbExclamation, "警告"
Text7.SetFocus
Exit Sub
End If
If Text8.Text = "" Then
MsgBox "請輸入郵政編碼!", vbOKOnly + vbExclamation, "警告"
Text8.SetFocus
Exit Sub
End If
If Text3.Text = "" Then
MsgBox "請輸入班級!", vbOKOnly + vbExclamation, "警告"
Text3.SetFocus
Exit Sub
End If
If DataCombo1.Text = "" Then
MsgBox "請輸入專業(yè)!", vbOKOnly + vbExclamation, "警告"
DataCombo1.SetFocus
Exit Sub
End If
If Text10.Text = "" Then
MsgBox "請輸入院系!", vbOKOnly + vbExclamation, "警告"
Text10.SetFocus
Exit Sub
End If
If Text9.Text = "" Then
MsgBox "請輸入電話號碼!", vbOKOnly + vbExclamation, "警告"
Text9.SetFocus
Exit Sub
End If
End If
If check1 = False Then
If Text1.Text <> Adodc2.Recordset.Fields("學號") Then
MsgBox "學號重復", vbOKOnly + vbExclamation, "警告"
Text1.SetFocus
Else
' Adodc2.Recordset.AddNew
Adodc2.Recordset.Fields("學號").Value = Text1.Text
Adodc2.Recordset.Fields("名字").Value = Text2.Text
Adodc2.Recordset.Fields("班級").Value = Text3.Text
Adodc2.Recordset.Fields("性別").Value = Combo1.Text
Adodc2.Recordset.Fields("出生年月").Value = Text4.Text
Adodc2.Recordset.Fields("民族").Value = Text5.Text
Adodc2.Recordset.Fields("父母姓名").Value = Text6.Text
Adodc2.Recordset.Fields("地址").Value = Text7.Text
Adodc2.Recordset.Fields("郵政編碼").Value = Text8.Text
Adodc2.Recordset.Fields("電話號碼").Value = Text9.Text
Adodc2.Recordset.Fields("院系").Value = Text10.Text
Adodc2.Recordset.Fields("專業(yè)").Value = DataCombo1.Text
Adodc2.Recordset.Fields("附注").Value = Text12.Text
Adodc2.Recordset.Update
'Adodc2.Recordset.Close
MsgBox "修改學籍信息成功!", vbOKOnly + vbExclamation, "修改學籍信息"
' Adodc2.Recordset.Bookmark = mybookmark
Command2.Enabled = True
Command3.Enabled = True
Command4.Enabled = True
Command5.Enabled = True
Command10.Enabled = True
'Text1.Enabled = False
'Text2.Enabled = False
'Text3.Enabled = False
'Text4.Enabled = False
'Text5.Enabled = False
'Text6.Enabled = False
'Text7.Enabled = False
'Text8.Enabled = False
'Text9.Enabled = False
'Combo1.Enabled = False
'DataCombo1.Enabled = False
'Text10.Enabled = False
'Text12.Enabled = False
mcclean = True
End If
Else
Adodc2.Recordset.Fields("學號").Value = Text1.Text
Adodc2.Recordset.Fields("名字").Value = Text2.Text
Adodc2.Recordset.Fields("班級").Value = Text3.Text
Adodc2.Recordset.Fields("性別").Value = Combo1.Text
Adodc2.Recordset.Fields("出生年月").Value = Text4.Text
Adodc2.Recordset.Fields("民族").Value = Text5.Text
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -