?? form2.frm
字號:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form frmAddGrade
BackColor = &H00FFC0C0&
BorderStyle = 3 'Fixed Dialog
Caption = "成績操作"
ClientHeight = 4095
ClientLeft = 45
ClientTop = 330
ClientWidth = 6180
Icon = "Form2.frx":0000
LinkTopic = "Form2"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 4095
ScaleWidth = 6180
ShowInTaskbar = 0 'False
StartUpPosition = 3 '窗口缺省
Begin VB.ComboBox Combo1
BackColor = &H00C0E0FF&
Height = 300
Left = 1200
TabIndex = 12
Text = "可選擇也可在此輸入"
Top = 480
Width = 2175
End
Begin MSAdodcLib.Adodc Adodc2
Height = 330
Left = 2760
Top = 3360
Visible = 0 'False
Width = 2055
_ExtentX = 3625
_ExtentY = 582
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 1
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = $"Form2.frx":06EA
OLEDBString = $"Form2.frx":0776
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = $"Form2.frx":0802
Caption = "Adodc2"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋體"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin VB.ComboBox Combo3
BackColor = &H00C0E0FF&
Height = 300
Left = 1200
TabIndex = 11
Top = 2400
Width = 2175
End
Begin VB.ComboBox Combo2
BackColor = &H00C0E0FF&
Height = 300
ItemData = "Form2.frx":08BB
Left = 1200
List = "Form2.frx":08BD
TabIndex = 10
Text = "可選擇也可在此輸入"
Top = 960
Width = 2175
End
Begin VB.TextBox Text3
BackColor = &H00C0E0FF&
DataSource = "Adodc1"
Height = 300
Left = 1200
TabIndex = 9
Top = 1920
Width = 2175
End
Begin VB.TextBox Text2
BackColor = &H00C0E0FF&
Height = 300
Left = 1200
TabIndex = 7
Top = 1440
Width = 2175
End
Begin MSAdodcLib.Adodc Adodc1
Height = 375
Left = 480
Top = 3240
Visible = 0 'False
Width = 1815
_ExtentX = 3201
_ExtentY = 661
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 2
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = $"Form2.frx":08BF
OLEDBString = $"Form2.frx":094B
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "學生與課程"
Caption = "Adodc1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋體"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin VB.CommandButton Command4
BackColor = &H0080C0FF&
Caption = "退出"
Height = 375
Left = 3960
Style = 1 'Graphical
TabIndex = 6
Top = 2280
Width = 1335
End
Begin VB.CommandButton Command3
BackColor = &H0080C0FF&
Caption = "刪除"
Height = 375
Left = 3960
Style = 1 'Graphical
TabIndex = 5
Top = 1680
Width = 1335
End
Begin VB.CommandButton Command2
BackColor = &H0080C0FF&
Caption = "更改"
Height = 375
Left = 3960
Style = 1 'Graphical
TabIndex = 4
Top = 1080
Width = 1335
End
Begin VB.CommandButton Command1
BackColor = &H0080C0FF&
Caption = "添加"
Height = 375
Left = 3960
Style = 1 'Graphical
TabIndex = 3
Top = 480
Width = 1335
End
Begin VB.Label Label7
BackStyle = 0 'Transparent
Caption = "課 程 號:"
Height = 255
Left = 240
TabIndex = 14
Top = 480
Width = 975
End
Begin VB.Label Label6
Caption = "Label6"
Height = 15
Left = 2040
TabIndex = 13
Top = 1560
Width = 1215
End
Begin VB.Label Label5
BackColor = &H00C0C0C0&
BackStyle = 0 'Transparent
Caption = "備注:"
ForeColor = &H00000000&
Height = 375
Left = 240
TabIndex = 8
Top = 2400
Width = 735
End
Begin VB.Label Label3
BackColor = &H00C0C0C0&
BackStyle = 0 'Transparent
Caption = "成 績:"
ForeColor = &H00000000&
Height = 375
Left = 240
TabIndex = 2
Top = 1920
Width = 1095
End
Begin VB.Label Label2
BackColor = &H00C0C0C0&
BackStyle = 0 'Transparent
Caption = "課程名稱:"
ForeColor = &H00000000&
Height = 375
Left = 240
TabIndex = 1
Top = 960
Width = 975
End
Begin VB.Label Label1
BackColor = &H00C0C0C0&
BackStyle = 0 'Transparent
Caption = "學 號:"
ForeColor = &H00000000&
Height = 375
Left = 240
TabIndex = 0
Top = 1440
Width = 975
End
End
Attribute VB_Name = "frmAddGrade"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim rs As New ADODB.Recordset
Private Sub Command1_Click()
On Error GoTo errh
If Combo1.Text <> "" Then
If Combo2.Text <> "" Then
If Text2.Text <> "" Then
If Text3.Text <> "" Then
If Combo3.Text <> "" Then
If checkclass Then
If checkcourse Then
If match = True Then
Adodc1.Recordset.AddNew
Adodc1.Recordset.Fields("課程號").Value = Combo1.Text
Adodc1.Recordset.Fields("學號").Value = Text2.Text
Adodc1.Recordset.Fields("成績").Value = Text3.Text
Adodc1.Recordset.Fields("課程名稱").Value = Combo2.Text
Adodc1.Recordset.Fields("備注").Value = Combo3.Text
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -