📄 form8.frm
字号:
VERSION 5.00
Begin VB.Form Form8
Caption = "成绩查询"
ClientHeight = 2970
ClientLeft = 60
ClientTop = 450
ClientWidth = 3345
LinkTopic = "Form8"
ScaleHeight = 2970
ScaleWidth = 3345
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 = 2775
Left = 120
TabIndex = 0
Top = 120
Width = 3135
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 = 1800
TabIndex = 6
Top = 1920
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 = 495
Left = 120
TabIndex = 5
Top = 1920
Width = 1215
End
Begin VB.ComboBox Combo1
Height = 300
Left = 1440
Style = 2 'Dropdown List
TabIndex = 4
Top = 1200
Width = 1455
End
Begin VB.TextBox Text1
Height = 375
Left = 1440
TabIndex = 2
Top = 480
Width = 1455
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 = 120
TabIndex = 3
Top = 1200
Width = 1215
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 = 120
TabIndex = 1
Top = 480
Width = 1095
End
End
End
Attribute VB_Name = "Form8"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
On Error GoTo ErrMsg
Dim sql1 As String
If Text1.Text = "" Or Combo1.Text = "" Then
MsgBox "您没有填好内容!", vbOKOnly + vbExclamation, "系统提示"
Exit Sub
End If
sql1 = "select " & Combo1.Text & " from 运动项目及成绩表m4119 where " & Text1.Text & "=a_no4119 and " & Combo1.Text & "!='NULL'"
Set adors = adocon.Execute(sql1)
If adors.BOF And adors.EOF Then
MsgBox "没有找到你需要的数据!", vbOKOnly + vbExclamation, "系统提示"
Else
MsgBox adors(0), vbOKOnly + vbInformation, "成功查询"
End If
ErrMsg:
If Err.Number <> 0 Then
MsgBox Err.Number & Err.Description, vbOKOnly + vbCritical, "出错提示"
Exit Sub
End If
End Sub
Private Sub Command2_Click()
Unload Me
'MDIForm1.Show
End Sub
Private Sub Form_Load()
On Error GoTo ErrMsg
Dim sql As String
sql = "select i_name4119 from 运动项目表4119"
Set adors = adocon.Execute(sql)
Do While adors.EOF = False
Combo1.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
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -