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

📄 input1.frm

📁 可以批量生成学生学号
💻 FRM
字号:
VERSION 5.00
Object = "{F0D2F211-CCB0-11D0-A316-00AA00688B10}#1.0#0"; "MSDATLST.OCX"
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form input1 
   Caption         =   "Form1"
   ClientHeight    =   2496
   ClientLeft      =   48
   ClientTop       =   336
   ClientWidth     =   5244
   FillColor       =   &H00C0C0C0&
   LinkTopic       =   "Form1"
   ScaleHeight     =   2496
   ScaleWidth      =   5244
   StartUpPosition =   3  '窗口缺省
   Begin VB.TextBox Text1 
      Height          =   264
      Left            =   720
      TabIndex        =   6
      Top             =   240
      Width           =   372
   End
   Begin VB.TextBox Text3 
      Height          =   264
      Left            =   3120
      TabIndex        =   5
      Top             =   240
      Width           =   372
   End
   Begin VB.CommandButton Command1 
      Caption         =   "确定"
      Height          =   372
      Left            =   1200
      MaskColor       =   &H00FFFF00&
      TabIndex        =   3
      Top             =   1320
      Width           =   972
   End
   Begin VB.CommandButton Command2 
      Caption         =   "取消"
      Height          =   372
      Left            =   2520
      TabIndex        =   2
      Top             =   1320
      Width           =   1092
   End
   Begin VB.ComboBox Combo1 
      Height          =   276
      Left            =   4320
      TabIndex        =   1
      Top             =   240
      Width           =   732
   End
   Begin VB.TextBox Text2 
      Height          =   264
      Left            =   1800
      TabIndex        =   0
      Top             =   240
      Width           =   612
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   312
      Left            =   1440
      Top             =   2040
      Visible         =   0   'False
      Width           =   1332
      _ExtentX        =   2350
      _ExtentY        =   550
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   1
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\student\teachmanage.mdb;Persist Security Info=False"
      OLEDBString     =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\student\teachmanage.mdb;Persist Security Info=False"
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   "select kid from course "
      Caption         =   "Adodc1"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin MSDataListLib.DataCombo DataCombo1 
      Bindings        =   "input1.frx":0000
      DataSource      =   "Adodc1"
      Height          =   300
      Left            =   2520
      TabIndex        =   4
      Top             =   840
      Width           =   972
      _ExtentX        =   1715
      _ExtentY        =   529
      _Version        =   393216
      ListField       =   "kid"
      Text            =   ""
   End
   Begin VB.Label Label1 
      Caption         =   "年级"
      Height          =   252
      Left            =   240
      TabIndex        =   11
      Top             =   240
      Width           =   372
   End
   Begin VB.Label Label2 
      Caption         =   "专业"
      Height          =   252
      Left            =   1200
      TabIndex        =   10
      Top             =   240
      Width           =   492
   End
   Begin VB.Label Label3 
      Caption         =   "班"
      Height          =   252
      Left            =   2520
      TabIndex        =   9
      Top             =   240
      Width           =   372
   End
   Begin VB.Label Label4 
      Caption         =   "学期"
      Height          =   252
      Left            =   3720
      TabIndex        =   8
      Top             =   240
      Width           =   492
   End
   Begin VB.Label Label5 
      Caption         =   "课程编号"
      Height          =   252
      Left            =   1440
      TabIndex        =   7
      Top             =   840
      Width           =   732
   End
End
Attribute VB_Name = "input1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim WithEvents adoprimaryrs As Recordset
Attribute adoprimaryrs.VB_VarHelpID = -1
Dim mbChangedByCode As Boolean
Dim mvBookMark As Variant
Dim mbEditFlag As Boolean
Dim mbAddNewFlag As Boolean
Dim mbDataChanged As Boolean
Private Sub Command1_Click()
t1 = CStr(Text1.Text) + CStr(Text2.Text) + CStr(Text3.Text)
t2 = CStr(Combo1.Text)
t3 = CStr(DataCombo1.Text)
myexit1 = "a"
Do
If Text1.Text = "" Or Text2.Text = "" Or Text3.Text = "" Or Combo1.Text = "" Or DataCombo1.Text = "" Then
   myexit1 = MsgBox("参数遗漏!", vbOKOnly)
   If myexit1 = vbOK Then
      Unload Me
      Exit Do
    End If
End If
  Dim db As Connection
  Set db = New Connection
  db.CursorLocation = adUseClient
  db.Open "PROVIDER=Microsoft.Jet.OLEDB.3.51;Data Source=" & path & "teachmanage.mdb;"

  Set adoprimaryrs = New Recordset
  'adoprimaryrs.Open " transform sum (score) select id ,kid ,score from score where category='bx' order by id group by id provt kid", db, adOpenStatic, adLockOptimistic
  
    l = "select * from score  where  id between '" & t1 & "01' and '" & t1 & "99' and semester='" & t2 & "' and category='必修' and kid ='" & t3 & "' Order by id"
    adoprimaryrs.Open l, db, adOpenStatic, adLockOptimistic
  If adoprimaryrs.RecordCount = 0 Then
   myexit1 = MsgBox("本班本学期本门课程初始数据未输入", vbOKOnly)
    If myexit1 = vbOK Then
     Me.Hide
       
    End If
   Exit Do
  Else
  Unload Me
  Dim f As New bxscore
      f.Show
  
 End If
  
Loop While myexit1 <> "a"
End Sub

Private Sub Command2_Click()
Me.Hide
End Sub

Private Sub Form_Load()
Combo1.AddItem "1"
Combo1.AddItem "2"
Combo1.AddItem "3"
Combo1.AddItem "4"
Combo1.AddItem "5"
Combo1.AddItem "6"
Combo1.AddItem "7"
Combo1.AddItem "8"
End Sub

⌨️ 快捷键说明

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