📄 form14.frm
字号:
VERSION 5.00
Begin VB.Form Form14
Caption = "参赛副项"
ClientHeight = 3975
ClientLeft = 60
ClientTop = 450
ClientWidth = 4095
LinkTopic = "Form14"
ScaleHeight = 3975
ScaleWidth = 4095
StartUpPosition = 3 '窗口缺省
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 = 3735
Left = 120
TabIndex = 0
Top = 120
Width = 3855
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 = 375
Left = 2400
TabIndex = 6
Top = 3000
Width = 1215
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 = 375
Left = 360
TabIndex = 5
Top = 3000
Width = 1215
End
Begin VB.ListBox List2
Height = 960
Left = 2520
TabIndex = 4
Top = 1680
Width = 1095
End
Begin VB.ListBox List1
Height = 960
Left = 2520
TabIndex = 3
Top = 480
Width = 1095
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 = 240
TabIndex = 2
Top = 1680
Width = 2175
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 = 240
TabIndex = 1
Top = 480
Width = 2175
End
End
End
Attribute VB_Name = "Form14"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
If List1.Text = "" Or List2.Text = "" Then
MsgBox "请选择运动员号或项目名称!", vbOKOnly + vbExclamation, "系统提示"
Exit Sub
End If
Set adors = adocon.Execute("select " & List2.Text & " from 运动项目及参赛表m4119 where " & List1.Text & "=a_no4119")
If adors(0) = 1 Then
MsgBox "您选的运动员已参加了此项目!", vbOKOnly + vbExclamation, "系统提示"
List1.Text = ""
List2.Text = ""
Exit Sub
End If
adocon.Execute ("update 运动项目及参赛表m4119 set " & List2.Text & "='1' where a_no4119=" & List1.Text & " ")
List1.Text = ""
List2.Text = ""
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Load()
On Error GoTo ErrMsg
Dim sql As String
sql = "select a_no4119 from 运动项目及参赛表m4119"
Set adors = adocon.Execute(sql)
Do While adors.EOF = False
List1.AddItem adors(0)
adors.MoveNext
Loop
sql = "select i_name4119 from 运动项目表4119"
Set adors = adocon.Execute(sql)
Do While adors.EOF = False
List2.AddItem adors(0)
adors.MoveNext
Loop
ErrMsg:
If Err.Number <> 0 Then
MsgBox Err.Number & Err.Description, vbOKOnly + vbCritical, "出错提示"
Exit Sub
End If
End Sub
Private Sub List1_Click()
'Set adors = adocon.Execute("select i_name4119 from 运动项目及参赛表m4119,运动项目表4119 where " & Text1.Text & "=运动项目及参赛表m4119.a_no4119 and ")
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -