📄 form5.frm
字号:
VERSION 5.00
Begin VB.Form Form5
Caption = "添加运动队"
ClientHeight = 3615
ClientLeft = 60
ClientTop = 450
ClientWidth = 3615
LinkTopic = "Form5"
ScaleHeight = 3615
ScaleWidth = 3615
StartUpPosition = 3 'Windows Default
Begin VB.Frame Frame1
Caption = "添加运动队"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 3375
Left = 120
TabIndex = 0
Top = 120
Width = 3375
Begin VB.CommandButton Command3
Caption = "取消"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 2040
TabIndex = 6
Top = 2520
Width = 1095
End
Begin VB.CommandButton Command2
Caption = "重置"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 2040
TabIndex = 5
Top = 1560
Width = 1095
End
Begin VB.CommandButton Command1
Caption = "添加"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 2040
TabIndex = 4
Top = 600
Width = 1095
End
Begin VB.TextBox Text3
Height = 375
Left = 360
TabIndex = 3
Top = 2640
Width = 1095
End
Begin VB.TextBox Text2
Height = 375
Left = 360
TabIndex = 2
Top = 1680
Width = 1095
End
Begin VB.TextBox Text1
Height = 375
Left = 360
TabIndex = 1
Top = 720
Width = 1095
End
Begin VB.Label Label3
Caption = "人数"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 360
TabIndex = 9
Top = 2280
Width = 615
End
Begin VB.Label Label2
Caption = "队名"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 360
TabIndex = 8
Top = 1320
Width = 615
End
Begin VB.Label Label1
Caption = "队号"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 360
TabIndex = 7
Top = 360
Width = 615
End
End
End
Attribute VB_Name = "Form5"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
On Error GoTo ErrMsg
If Text1.Text = "" Or Text2.Text = "" Or Text3.Text = "" Then
MsgBox "请您输入正确数据!", vbOKOnly + vbExclamation, "系统提示"
Exit Sub
End If
Set adors = adocon.Execute("select a_noteam4119 from 运动队4119 where " & Text1.Text & "=a_noteam4119")
If adors.EOF Then
adocon.Execute ("insert into 运动队4119 values(" & Text1.Text & ",'" & Text2.Text & "'," & Text3.Text & ")")
adocon.Execute ("insert into 运动队成绩表4119(a_noteam4119) values(" & Text1.Text & ")")
'MsgBox "此队号已存在,无法添加!", vbOKOnly + vbExclamation, "系统提示"
'Exit Sub
Else
MsgBox "此队号已存在,无法添加!", vbOKOnly + vbExclamation, "系统提示"
Exit Sub
End If
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
ErrMsg:
If Err.Number <> 0 Then
MsgBox Err.Number & Err.Description, vbOKOnly + vbCritical, "出错提示"
Exit Sub
End If
End Sub
Private Sub Command2_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
End Sub
Private Sub Command3_Click()
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -