- VERSION 5.00
- Begin VB.Form main_gzgl_kqgl_pl
- BorderStyle = 3 'Fixed Dialog
- Caption = "批量修改"
- ClientHeight = 2055
- ClientLeft = 45
- ClientTop = 330
- ClientWidth = 5925
- Icon = "main_gzgl_kqgl_pl.frx":0000
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 2055
- ScaleWidth = 5925
- ShowInTaskbar = 0 'False
- StartUpPosition = 2 '屏幕中心
- Begin VB.CommandButton Command2
- Caption = "&C 取消"
- Height = 390
- Left = 3015
- TabIndex = 6
- Top = 1515
- Width = 1380
- End
- Begin VB.CommandButton Command1
- Caption = "&O 确定"
- Height = 390
- Left = 1575
- TabIndex = 5
- Top = 1515
- Width = 1380
- End
- Begin VB.Frame Frame1
- Height = 1350
- Left = 0
- TabIndex = 0
- Top = -60
- Width = 5910
- Begin VB.TextBox Text1
- Height = 300
- Left = 1680
- TabIndex = 2
- Top = 750
- Width = 3930
- End
- Begin VB.ComboBox cboFields1
- Height = 300
- ItemData = "main_gzgl_kqgl_pl.frx":000C
- Left = 1680
- List = "main_gzgl_kqgl_pl.frx":000E
- TabIndex = 1
- Top = 345
- Width = 3930
- End
- Begin VB.Label Label4
- BackStyle = 0 'Transparent
- Caption = "批量修改的项目:"
- Height = 300
- Left = 255
- TabIndex = 4
- Top = 405
- Width = 1545
- End
- Begin VB.Label Label3
- BackStyle = 0 'Transparent
- Caption = "批量修改的数值:"
- Height = 300
- Left = 255
- TabIndex = 3
- Top = 825
- Width = 1485
- End
- End
- End
- Attribute VB_Name = "main_gzgl_kqgl_pl"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Private Sub Form_Load()
- Dim rs1 As New ADODB.Recordset
- rs1.Open "select * from 考勤表", Cnn, adOpenKeyset, adLockOptimistic
- Dim fld
- Set fld = rs1.Fields
- For i = 3 To 7
- cboFields1.AddItem fld(i).Name
- Next i
- rs1.Close
- End Sub
- Private Sub Command1_Click()
- With main_gzgl_kqgl
- If .Toolbar1.Buttons(1).Caption = "所有月份" Then
- If sql1 <> "" Then
- Cnn.Execute ("update 考勤表 set " & cboFields1 & "=" + Text1 + " from " & sql1)
- Else
- Cnn.Execute ("update 考勤表 set " & cboFields1 & "=" + Text1 + "")
- End If
- Else
- If sql1 <> "" Then
- Cnn.Execute ("update 考勤表 set " & cboFields1 & "=" + Text1 + " from " & sql1 & "and 考勤表.所属工资月份=(select 月份 from 月份表)")
- Else
- Cnn.Execute ("update 考勤表 set " & cboFields1 & "=" + Text1 + " where 考勤表.所属工资月份=(select 月份 from 月份表)")
- End If
- End If
- .Adodc1.Refresh
- End With
- Unload Me
- End Sub
- Private Sub Command2_Click()
- Unload Me
- End Sub