main_gzgl_gzgl_pl.frm
上传用户:ake0106
上传日期:2022-07-23
资源大小:4052k
文件大小:4k
源码类别:

企业管理

开发平台:

Visual Basic

  1. VERSION 5.00
  2. Begin VB.Form main_gzgl_gzgl_pl 
  3.    BorderStyle     =   3  'Fixed Dialog
  4.    Caption         =   "批量修改"
  5.    ClientHeight    =   2130
  6.    ClientLeft      =   45
  7.    ClientTop       =   330
  8.    ClientWidth     =   5925
  9.    Icon            =   "main_gzgl_gzgl_pl.frx":0000
  10.    LinkTopic       =   "Form1"
  11.    MaxButton       =   0   'False
  12.    MinButton       =   0   'False
  13.    ScaleHeight     =   2130
  14.    ScaleWidth      =   5925
  15.    ShowInTaskbar   =   0   'False
  16.    StartUpPosition =   2  '屏幕中心
  17.    Begin VB.Frame Frame1 
  18.       Height          =   1350
  19.       Left            =   15
  20.       TabIndex        =   2
  21.       Top             =   -75
  22.       Width           =   5910
  23.       Begin VB.ComboBox cboFields1 
  24.          Height          =   300
  25.          ItemData        =   "main_gzgl_gzgl_pl.frx":000C
  26.          Left            =   1680
  27.          List            =   "main_gzgl_gzgl_pl.frx":000E
  28.          TabIndex        =   4
  29.          Top             =   345
  30.          Width           =   3930
  31.       End
  32.       Begin VB.TextBox Text1 
  33.          Height          =   300
  34.          Left            =   1680
  35.          TabIndex        =   3
  36.          Top             =   750
  37.          Width           =   3930
  38.       End
  39.       Begin VB.Label Label3 
  40.          BackStyle       =   0  'Transparent
  41.          Caption         =   "批量修改的金额:"
  42.          Height          =   300
  43.          Left            =   255
  44.          TabIndex        =   6
  45.          Top             =   825
  46.          Width           =   1485
  47.       End
  48.       Begin VB.Label Label4 
  49.          BackStyle       =   0  'Transparent
  50.          Caption         =   "批量修改的项目:"
  51.          Height          =   300
  52.          Left            =   255
  53.          TabIndex        =   5
  54.          Top             =   405
  55.          Width           =   1545
  56.       End
  57.    End
  58.    Begin VB.CommandButton Command1 
  59.       Caption         =   "&O 确定"
  60.       Height          =   390
  61.       Left            =   1590
  62.       TabIndex        =   1
  63.       Top             =   1500
  64.       Width           =   1380
  65.    End
  66.    Begin VB.CommandButton Command2 
  67.       Caption         =   "&C 取消"
  68.       Height          =   390
  69.       Left            =   3030
  70.       TabIndex        =   0
  71.       Top             =   1500
  72.       Width           =   1380
  73.    End
  74. End
  75. Attribute VB_Name = "main_gzgl_gzgl_pl"
  76. Attribute VB_GlobalNameSpace = False
  77. Attribute VB_Creatable = False
  78. Attribute VB_PredeclaredId = True
  79. Attribute VB_Exposed = False
  80. Private Sub Form_Load()
  81.   Dim rs1 As New ADODB.Recordset
  82.   rs1.Open "select * from 工资表", Cnn, adOpenKeyset, adLockOptimistic
  83.   Dim fld
  84.   Set fld = rs1.Fields
  85.   For i = 3 To 15
  86.       cboFields1.AddItem fld(i).Name
  87.   Next i
  88.   rs1.Close
  89. End Sub
  90. Private Sub Command1_Click()
  91.   With main_gzgl_gzgl
  92.      If .Toolbar1.Buttons(1).Caption = "所有月份" Then
  93.        If sql1 <> "" Then
  94.           Cnn.Execute "update 工资表 set " & cboFields1.text & "=" & Text1.text & " from " & sql1
  95.        Else
  96.           Cnn.Execute "update 工资表 set " & cboFields1.text & "=" & Text1.text & ""
  97.        End If
  98.      Else
  99.        If sql1 <> "" Then
  100.          Cnn.Execute "update 工资表 set " & cboFields1.text & "=" & Text1.text & " from " & sql1 & " and 所属工资月份=(select 月份 from 月份表)"
  101.        Else
  102.          Cnn.Execute "update 工资表 set " & cboFields1.text & "=" & Text1.text & " from 工资表 where 所属工资月份=(select 月份 from 月份表)"
  103.        End If
  104.      End If
  105.      .Adodc1.Refresh
  106.   End With
  107.   Unload Me
  108. End Sub
  109. Private Sub Command2_Click()
  110.   Unload Me
  111. End Sub