⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 playerorder.frm

📁 NBA的部分球员
💻 FRM
字号:
VERSION 5.00
Object = "{00028C01-0000-0000-0000-000000000046}#1.0#0"; "DBGRID32.OCX"
Begin VB.Form PlayerOrder 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "球员数据统计查询"
   ClientHeight    =   8265
   ClientLeft      =   45
   ClientTop       =   435
   ClientWidth     =   7680
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   8265
   ScaleWidth      =   7680
   StartUpPosition =   3  '窗口缺省
   Begin VB.Data Data1 
      Caption         =   "Data1"
      Connect         =   "Access"
      DatabaseName    =   ""
      DefaultCursorType=   0  '缺省游标
      DefaultType     =   2  '使用 ODBC
      Exclusive       =   0   'False
      Height          =   285
      Left            =   9120
      Options         =   0
      ReadOnly        =   0   'False
      RecordsetType   =   1  'Dynaset
      RecordSource    =   ""
      Top             =   5040
      Visible         =   0   'False
      Width           =   1140
   End
   Begin VB.ComboBox Combo3 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   15
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   420
      ItemData        =   "PlayerOrder.frx":0000
      Left            =   2160
      List            =   "PlayerOrder.frx":0031
      Style           =   2  'Dropdown List
      TabIndex        =   4
      Top             =   360
      Width           =   2055
   End
   Begin VB.ComboBox Combo2 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   15
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   420
      ItemData        =   "PlayerOrder.frx":009F
      Left            =   2160
      List            =   "PlayerOrder.frx":00C7
      Style           =   2  'Dropdown List
      TabIndex        =   3
      Top             =   1080
      Width           =   2055
   End
   Begin VB.Data Data2 
      Caption         =   "Data2"
      Connect         =   "Access"
      DatabaseName    =   ""
      DefaultCursorType=   0  '缺省游标
      DefaultType     =   2  '使用 ODBC
      Exclusive       =   0   'False
      Height          =   345
      Left            =   8880
      Options         =   0
      ReadOnly        =   0   'False
      RecordsetType   =   1  'Dynaset
      RecordSource    =   ""
      Top             =   6480
      Visible         =   0   'False
      Width           =   1215
   End
   Begin MSDBGrid.DBGrid DBGrid1 
      Bindings        =   "PlayerOrder.frx":0107
      Height          =   5535
      Left            =   240
      OleObjectBlob   =   "PlayerOrder.frx":011B
      TabIndex        =   0
      Top             =   2520
      Width           =   7215
   End
   Begin VB.Label Label2 
      Caption         =   "场均得分数排名"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   15
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   240
      TabIndex        =   5
      Top             =   1920
      Width           =   2895
   End
   Begin VB.Label Label1 
      Caption         =   "请选择项目:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   15
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Index           =   1
      Left            =   240
      TabIndex        =   2
      Top             =   1080
      Width           =   1815
   End
   Begin VB.Label Label1 
      Caption         =   "请选择赛季:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   15
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Index           =   0
      Left            =   240
      TabIndex        =   1
      Top             =   360
      Width           =   1695
   End
End
Attribute VB_Name = "PlayerOrder"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False


Private Sub Combo2_Click()
On Error GoTo orderr
'n = 1
'Do While n <= Len(Combo2) And Mid(Combo2, n, 1) <> "("
'n = n + 1
'Loop
Data1.RecordSource = "Select player.Cname,player_Statistic.season,player_Statistic." + Combo2 + " from player,player_Statistic where season='" + Combo3 + "' and player.id= player_Statistic.id order by " + Combo2 + " desc"
Data1.Refresh





Select Case Combo2
Case "GP"
    Label2.Caption = "出场数排名"
Case "GS"
    Label2.Caption = "首发数排名"
Case "TO"
    Label2.Caption = "场均失误数排名"
Case "Fouls"
    Label2.Caption = "场均犯规数排名"
Case "RPG"
    Label2.Caption = "场均篮板数排名"
Case "PPG"
    Label2.Caption = "场均得分数排名"
Case "SPG"
    Label2.Caption = "场均抢断数排名"
Case "APG"
    Label2.Caption = "场均助攻数排名"
Case "BPG"
    Label2.Caption = "场均盖帽数排名"
Case "Mins"
    Label2.Caption = "场均上场时间排名"
Case "FGP"
    Label2.Caption = "命中率排名"
Case "FTP"
    Label2.Caption = "罚球命中率排名"
Case Else
    Label2.Caption = "不存在"
End Select

Exit Sub
orderr:
Data1.RecordSource = "Select player.Cname,player_Statistic.season,player_Statistic.PPG from player,player_Statistic where season='03-04' and player.id= player_Statistic.id order by PPG desc"
MsgBox ("排序属性选择有误!")
Data1.Refresh
End Sub

Private Sub Combo3_Click()
On Error GoTo orderr
Data1.RecordSource = "Select player.Cname,player_Statistic.season,player_Statistic." + Combo2 + " from player,player_Statistic where season='" + Combo3 + "' and player.id= player_Statistic.id order by " + Combo2 + " desc"
Data1.Refresh
Exit Sub
orderr:
Data1.RecordSource = "Select player.Cname,player_Statistic.season,player_Statistic.PPG from player,player_Statistic where season='03-04' and player.id= player_Statistic.id order by PPG desc"
MsgBox ("排序属性选择有误!")
Data1.Refresh
End Sub



Private Sub Form_Load()
If dbpath = "" Then Unload Me
ad = False
md = False
'Label2.Caption = "场均得分数排名"
Data1.DatabaseName = dbpath
Data2.DatabaseName = dbpath
Data2.RecordSource = player
Data1.RecordSource = "Select player.Cname,player_Statistic.season,player_Statistic.PPG from player,player_Statistic where season='03-04' and player.id= player_Statistic.id order by PPG desc"

End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -