main_gzgl_gqsjcl.frm
上传用户:wd52qq
上传日期:2022-07-24
资源大小:5366k
文件大小:3k
- VERSION 5.00
- Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
- Begin VB.Form main_gzgl_gqsjcl
- BorderStyle = 3 'Fixed Dialog
- Caption = "Form1"
- ClientHeight = 3300
- ClientLeft = 45
- ClientTop = 330
- ClientWidth = 3705
- Icon = "main_gzgl_gqsjcl.frx":0000
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 3300
- ScaleWidth = 3705
- ShowInTaskbar = 0 'False
- StartUpPosition = 2 '屏幕中心
- Begin MSComctlLib.ProgressBar ProgressBar1
- Height = 240
- Left = 60
- TabIndex = 3
- Top = 2445
- Visible = 0 'False
- Width = 3570
- _ExtentX = 6297
- _ExtentY = 423
- _Version = 393216
- Appearance = 1
- End
- Begin VB.CommandButton Command2
- Caption = "取消"
- Height = 390
- Left = 1920
- TabIndex = 2
- Top = 2790
- Width = 1305
- End
- Begin VB.CommandButton Command1
- Caption = "确定"
- Height = 390
- Left = 375
- TabIndex = 1
- Top = 2790
- Width = 1305
- End
- Begin VB.ListBox List1
- Height = 2370
- Left = 60
- Style = 1 'Checkbox
- TabIndex = 0
- Top = 45
- Width = 3570
- End
- End
- Attribute VB_Name = "main_gzgl_gqsjcl"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Dim rs1 As New ADODB.Recordset
- Private Sub Command1_Click()
- Dim Counter As Integer '定义一个整型变量
- Dim Workarea(250) As String '定义字符串变量
- ProgressBar1.Visible = True
- ProgressBar1.Max = UBound(Workarea)
- ProgressBar1.Min = LBound(Workarea)
- '设置进度的值为 Min
- ProgressBar1.Value = ProgressBar1.Min
- '在整个数组中循环
- For Counter = LBound(Workarea) To UBound(Workarea)
- '设置数组中每项的初始值
- Workarea(Counter) = Counter
- ProgressBar1.Value = Counter
- For i = 0 To List1.ListCount - 1
- If List1.Selected(i) = True Then
- Cnn.Execute ("delete from 工资表 where 所属工资月份='" & List1.List(i)) & "'"
- End If
- Next i
- Next Counter
- ProgressBar1.Visible = False
- ProgressBar1.Value = ProgressBar1.Min
- End Sub
- Private Sub Form_Load()
- Me.Caption = text
- rs1.Open "select 所属工资月份 from 工资表 group by 所属工资月份", Cnn, adOpenKeyset, adLockOptimistic
- If rs1.RecordCount > 0 Then
- rs1.MoveFirst
- Do While rs1.EOF = False
- List1.AddItem rs1.Fields("所属工资月份")
- rs1.MoveNext
- Loop
- End If
- rs1.Close
- End Sub
- Private Sub Command2_Click()
- Unload Me
- End Sub