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

📄 form6.frm

📁 运动会成绩统计系统。运动员的添加
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form6 
   Caption         =   "成绩修改"
   ClientHeight    =   3975
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   5295
   LinkTopic       =   "Form6"
   ScaleHeight     =   3975
   ScaleWidth      =   5295
   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           =   5055
      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            =   3600
         TabIndex        =   8
         Top             =   3120
         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            =   3600
         TabIndex        =   7
         Top             =   2280
         Width           =   1215
      End
      Begin VB.ListBox List1 
         Height          =   2220
         Left            =   1200
         TabIndex        =   6
         Top             =   1320
         Width           =   2055
      End
      Begin VB.TextBox Text2 
         Height          =   375
         Left            =   3480
         TabIndex        =   4
         Top             =   480
         Width           =   1455
      End
      Begin VB.TextBox Text1 
         Height          =   375
         Left            =   1200
         TabIndex        =   2
         Top             =   480
         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          =   375
         Left            =   120
         TabIndex        =   5
         Top             =   1320
         Width           =   975
      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          =   375
         Left            =   2520
         TabIndex        =   3
         Top             =   480
         Width           =   855
      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          =   375
         Left            =   120
         TabIndex        =   1
         Top             =   480
         Width           =   975
      End
   End
End
Attribute VB_Name = "Form6"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim strtmp1 As String
Private Sub Command1_Click()
On Error GoTo ErrMsg
Dim sql As String
'Dim a As Integer
'Dim b As Integer
'b = 0
'a = 0
'Dim sql1 As String
If Text1.Text = "" Or Text2.Text = "" Or List1.Text = "" Then
   MsgBox "请输入数据!", vbOKOnly + vbExclamation, "系统提示"
   Exit Sub
End If
Set adors = adocon.Execute("select a_no4119 from 运动项目及成绩表m4119 where " & Text1.Text & "=a_no4119")
If adors.EOF Then
    MsgBox "无此运动员或他的成绩还未录入!", vbOKOnly + vbExclamation, "系统提示"
    Exit Sub
End If
sql = "update 运动项目及成绩表m4119 set " & strtmp1 & " = " & Text2.Text & " where a_no4119 = " & Text1.Text & ""
adocon.Execute (sql)
'sql1 = ""
'adocon.Execute (sql1)
'If Text1.Text = "" Or Text2.Text = "" Then
'MsgBox "您没有填好内容!", vbOKOnly + vbCritical, "错误提示"
'Exit Sub
'End If
'Set adors = adocon.Execute("Select a_no4119 From 运动项目及成绩表m4119")
'Do While adors.EOF = False
        'adors(0) = Text1.Text
        'b = a + 1
        'adors.MoveNext
        'Loop
  'If b > 0 Then MsgBox "运动项目及成绩表m4119表中没有该人记录,请输入!", vbOKOnly + vbExclamation, "系统提示"
 ' Exit Sub
  'End If
'sql = "update 运动项目及成绩表m4119 set " & strtmp1 & " = " & Text2.Text & " where a_no4119 = " & Text1.Text & ""
'adocon.Execute (sql)
Text1.Text = ""
Text2.Text = ""
List1.Text = ""
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
List1.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()
'Dim i As Integer
'For i = 0 To List1.ListCount - 1
 strtmp1 = List1.Text
'Next i
End Sub

⌨️ 快捷键说明

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