?? 課程修改.frm
字號:
End
Begin VB.TextBox Text7
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 4440
TabIndex = 12
Text = "Text7"
Top = 1440
Width = 2295
End
Begin VB.TextBox Text6
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1320
TabIndex = 10
Text = "Text6"
Top = 1440
Width = 1935
End
Begin VB.TextBox Text5
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 6600
TabIndex = 8
Text = "Text5"
Top = 960
Width = 3615
End
Begin VB.TextBox Text4
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1320
TabIndex = 6
Text = "Text4"
Top = 960
Width = 3255
End
Begin VB.TextBox Text2
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 4440
TabIndex = 4
Text = "Text2"
Top = 480
Width = 2295
End
Begin VB.TextBox Text1
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 960
TabIndex = 1
Text = "Text1"
Top = 480
Width = 2295
End
Begin VB.Label Label10
Caption = "考試性質:"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 5880
TabIndex = 18
Top = 1920
Width = 1095
End
Begin VB.Label Label9
Caption = "課程性質:"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 240
TabIndex = 15
Top = 1920
Width = 1095
End
Begin VB.Label Label8
Caption = "上課地點:"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 7200
TabIndex = 13
Top = 1440
Width = 1095
End
Begin VB.Label Label7
Caption = "課時:"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 3720
TabIndex = 11
Top = 1440
Width = 1095
End
Begin VB.Label Label6
Caption = "任課老師:"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 240
TabIndex = 9
Top = 1440
Width = 1095
End
Begin VB.Label Label5
Caption = "教材:"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 5880
TabIndex = 7
Top = 1080
Width = 1095
End
Begin VB.Label Label4
Caption = "課程名稱:"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 240
TabIndex = 5
Top = 960
Width = 1095
End
Begin VB.Label Label3
Caption = "學期:"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 7200
TabIndex = 3
Top = 480
Width = 735
End
Begin VB.Label Label2
Caption = "年級:"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 3720
TabIndex = 2
Top = 480
Width = 735
End
Begin VB.Label Label1
Caption = "專業:"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 240
TabIndex = 0
Top = 480
Width = 735
End
End
Attribute VB_Name = "Frm_UpdateGrean"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
If admin = 1 Then
Dim myCon As New ADODB.Connection
Dim myRs As New ADODB.Recordset
Dim ZhuanYe, NianJi, XueQi, KeCheng, JiaoCai, RenKLS, KeShi, ShangKeDD, KeChengXZ, KaoShiXZ As String
ZhuanYe = Text1.Text
NianJi = Text2.Text
XueQi = DTPicker1.Value
KeCheng = Text4.Text
JiaoCai = Text5.Text
RenKLS = Text6.Text
KeShi = Text7.Text
ShangKeDD = Text8.Text
KeChengXZ = Combo1.Text
KaoShiXZ = Combo2.Text
If Trim(ZhuanYe) = "" Or Trim(NianJi) = "" Or Trim(XueQi) = "" Or Trim(KeCheng) = "" Or Trim(JiaoCai) = "" Or Trim(RenKLS) = "" Or Trim(KeShi) = "" Or Trim(ShangKeDD) = "" Or Trim(KeChengXZ) = "" Or Trim(KaoShiXZ) = "" Then
MsgBox "請填寫要修改課程資料的內容!"
Combo1.Text = ""
Combo2.Text = ""
Exit Sub
End If
myCon.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=信息.mdb;"
myRs.Open "select * from 課程表 where 專業='" & Text1.Text & "'", myCon, 3, 2
myRs!年級 = Text2.Text
myRs!學期 = DTPicker1.Value
myRs!課程名稱 = Text4.Text
myRs!教材 = Text5.Text
myRs!任課老師 = Text6.Text
myRs!課時 = Text7.Text
myRs!上課地點 = Text8.Text
myRs!課程性質 = Combo1.Text
myRs!考試性質 = Combo2.Text
myRs.Update
myRs.Close
myCon.Close
MsgBox "您確定要修改嗎?", vbYesNo, "提示"
Frm_UpdateGrean.Adodc1.Refresh
Frm_UpdateGrean.DataGrid1.Refresh
Text1.Text = ""
Text2.Text = ""
'Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Combo1.Text = ""
Combo2.Text = ""
Else
MsgBox "對不起,您沒有這個權限!", vbOKOnly + vbExclamation, "提示"
End If
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Command3_Click()
Unload Me
Frm_FindGrean.Show 1
End Sub
Private Sub DataGrid1_Click()
'Frm_UpdateGrean.Adodc1.RecordSource = "select * from 課程表 where 專業 = '" & Trim(DataGrid1.Row) & "'"
'Text1.Text = Frm_UpdateGrean.Adodc1.Recordset.Fields("專業")
'Text2.Text = Frm_UpdateGrean.Adodc1.Recordset.Fields("年級")
'Text3.Text = Frm_UpdateGrean.Adodc1.Recordset.Fields("學期")
'Text4.Text = Frm_UpdateGrean.Adodc1.Recordset.Fields("課程名稱")
'Text5.Text = Frm_UpdateGrean.Adodc1.Recordset.Fields("教材")
'Text6.Text = Frm_UpdateGrean.Adodc1.Recordset.Fields("任課老師")
'Text7.Text = Frm_UpdateGrean.Adodc1.Recordset.Fields("課時")
'Text8.Text = Frm_UpdateGrean.Adodc1.Recordset.Fields("上課地點")
'Combo1.Text = Frm_UpdateGrean.Adodc1.Recordset.Fields("課程性質")
'Combo2.Text = Frm_UpdateGrean.Adodc1.Recordset.Fields("考試性質")
End Sub
Private Sub Form_Activate()
Frm_FindGrean.Adodc1.RecordSource = strTiaoJian
Frm_FindGrean.Adodc1.Refresh
Set DataGrid1.DataSource = Frm_FindGrean.Adodc1
End Sub
Private Sub Form_Load()
Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=信息.mdb;Persist Security Info=False"
Combo1.AddItem ("必修")
Combo1.AddItem ("選修")
Combo1.AddItem ("自開")
Combo2.AddItem ("考試")
Combo2.AddItem ("查考")
Text1.Text = ""
Text2.Text = ""
'Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Combo1.Text = ""
Combo2.Text = ""
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -