📄 form6.frm
字号:
VERSION 5.00
Begin VB.Form 成绩修改
Caption = "成绩修改"
ClientHeight = 9495
ClientLeft = 60
ClientTop = 390
ClientWidth = 10035
LinkTopic = "Form6"
Picture = "Form6.frx":0000
ScaleHeight = 9495
ScaleWidth = 10035
StartUpPosition = 3 '窗口缺省
Begin VB.TextBox Text3
BeginProperty Font
Name = "宋体"
Size = 15
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 4080
TabIndex = 8
Top = 5400
Width = 1935
End
Begin VB.TextBox Text2
BeginProperty Font
Name = "宋体"
Size = 15
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 4080
TabIndex = 7
Top = 3360
Width = 1935
End
Begin VB.TextBox Text1
BeginProperty Font
Name = "宋体"
Size = 15
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 4080
TabIndex = 6
Top = 1920
Width = 1935
End
Begin VB.CommandButton Command3
Caption = "确认"
BeginProperty Font
Name = "宋体"
Size = 18
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 7320
TabIndex = 5
Top = 1920
Width = 1215
End
Begin VB.CommandButton Command2
Caption = "修改"
BeginProperty Font
Name = "宋体"
Size = 18
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 735
Left = 7080
TabIndex = 3
Top = 5400
Width = 1455
End
Begin VB.CommandButton Command1
Caption = "返回"
BeginProperty Font
Name = "宋体"
Size = 15.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 735
Left = 7800
TabIndex = 2
Top = 7800
Width = 1455
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "此运动员的成绩为:"
BeginProperty Font
Name = "宋体"
Size = 15.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 735
Left = 600
TabIndex = 9
Top = 3360
Width = 2895
End
Begin VB.Label Label4
BackStyle = 0 'Transparent
Caption = "将成绩修改为:"
BeginProperty Font
Name = "宋体"
Size = 18
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 735
Left = 720
TabIndex = 4
Top = 5520
Width = 2655
End
Begin VB.Label Label3
BackStyle = 0 'Transparent
Caption = "请输入运动员编号:"
BeginProperty Font
Name = "宋体"
Size = 15.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = -1 'True
Strikethrough = 0 'False
EndProperty
Height = 735
Left = 600
TabIndex = 1
Top = 1920
Width = 3135
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "运动员成绩修改"
BeginProperty Font
Name = "宋体"
Size = 26.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 735
Left = 2640
TabIndex = 0
Top = 360
Width = 3975
End
End
Attribute VB_Name = "成绩修改"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
登入界面.Show
Unload Me
End Sub
Private Sub Command2_Click()
Dim rs As ADODB.Command
Dim str As String
Set rs = New ADODB.Command
Call OpenDB
str = "update 成绩表 set 成绩= '" & Text3.Text & "'"
Set rs.ActiveConnection = Conn
rs.CommandText = str
rs.Execute
Set rs = Nothing
Conn.Close
Set Conn = Nothing
MsgBox "修改成功"
End Sub
Private Sub Command3_Click()
Dim rs As ADODB.Recordset
Dim StrSQL As String
Set rs = New ADODB.Recordset
Call OpenDB
StrSQL = "SELECT* FROM 成绩表 WHERE 编号='" & Text1.Text & "'"
rs.Open StrSQL, Conn, adLockPessimistic
If Not rs.EOF Then
Text2.Text = rs("成绩").Value
Else
MsgBox "不好意思,无此运动员!!!"
End If
rs.Close
Conn.Close
Set Conn = Nothing
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -