F_CunDangFeiYong.frm
上传用户:xiao_xia32
上传日期:2022-07-21
资源大小:1174k
文件大小:25k
源码类别:

企业管理

开发平台:

Visual Basic

  1. VERSION 5.00
  2. Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
  3. Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
  4. Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "TABCTL32.OCX"
  5. Object = "{0BA686C6-F7D3-101A-993E-0000C0EF6F5E}#1.0#0"; "THREED32.OCX"
  6. Begin VB.Form F_CunDangFeiYong 
  7.    BorderStyle     =   3  'Fixed Dialog
  8.    Caption         =   "存档费用结算表"
  9.    ClientHeight    =   5670
  10.    ClientLeft      =   1095
  11.    ClientTop       =   330
  12.    ClientWidth     =   9690
  13.    ControlBox      =   0   'False
  14.    KeyPreview      =   -1  'True
  15.    LinkTopic       =   "Form1"
  16.    LockControls    =   -1  'True
  17.    MaxButton       =   0   'False
  18.    MinButton       =   0   'False
  19.    Moveable        =   0   'False
  20.    ScaleHeight     =   5670
  21.    ScaleWidth      =   9690
  22.    StartUpPosition =   2  '屏幕中心
  23.    Begin VB.Frame Frame1 
  24.       BeginProperty Font 
  25.          Name            =   "MS Sans Serif"
  26.          Size            =   8.25
  27.          Charset         =   0
  28.          Weight          =   400
  29.          Underline       =   0   'False
  30.          Italic          =   0   'False
  31.          Strikethrough   =   0   'False
  32.       EndProperty
  33.       Height          =   5415
  34.       Left            =   120
  35.       TabIndex        =   15
  36.       Top             =   120
  37.       Width           =   9375
  38.       Begin TabDlg.SSTab SSTab1 
  39.          Height          =   4815
  40.          Left            =   240
  41.          TabIndex        =   16
  42.          Top             =   360
  43.          Width           =   9015
  44.          _ExtentX        =   15901
  45.          _ExtentY        =   8493
  46.          _Version        =   393216
  47.          Tabs            =   2
  48.          TabHeight       =   520
  49.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  50.             Name            =   "宋体"
  51.             Size            =   9
  52.             Charset         =   134
  53.             Weight          =   400
  54.             Underline       =   0   'False
  55.             Italic          =   0   'False
  56.             Strikethrough   =   0   'False
  57.          EndProperty
  58.          TabCaption(0)   =   "编        辑"
  59.          TabPicture(0)   =   "F_CunDangFeiYong.frx":0000
  60.          Tab(0).ControlEnabled=   -1  'True
  61.          Tab(0).Control(0)=   "Frame3"
  62.          Tab(0).Control(0).Enabled=   0   'False
  63.          Tab(0).Control(1)=   "Picture1"
  64.          Tab(0).Control(1).Enabled=   0   'False
  65.          Tab(0).ControlCount=   2
  66.          TabCaption(1)   =   "列        表"
  67.          TabPicture(1)   =   "F_CunDangFeiYong.frx":001C
  68.          Tab(1).ControlEnabled=   0   'False
  69.          Tab(1).Control(0)=   "Frame4"
  70.          Tab(1).Control(0).Enabled=   0   'False
  71.          Tab(1).ControlCount=   1
  72.          Begin VB.PictureBox Picture1 
  73.             Appearance      =   0  'Flat
  74.             BorderStyle     =   0  'None
  75.             BeginProperty Font 
  76.                Name            =   "MS Sans Serif"
  77.                Size            =   8.25
  78.                Charset         =   0
  79.                Weight          =   400
  80.                Underline       =   0   'False
  81.                Italic          =   0   'False
  82.                Strikethrough   =   0   'False
  83.             EndProperty
  84.             ForeColor       =   &H80000008&
  85.             Height          =   660
  86.             Left            =   1800
  87.             ScaleHeight     =   660
  88.             ScaleWidth      =   6960
  89.             TabIndex        =   30
  90.             Top             =   4080
  91.             Width           =   6960
  92.             Begin Threed.SSCommand cmdClose 
  93.                Height          =   330
  94.                Left            =   5640
  95.                TabIndex        =   31
  96.                Top             =   240
  97.                Width           =   1095
  98.                _Version        =   65536
  99.                _ExtentX        =   1931
  100.                _ExtentY        =   573
  101.                _StockProps     =   78
  102.                Caption         =   "&Q.关 闭"
  103.                Font3D          =   1
  104.             End
  105.             Begin Threed.SSCommand cmdRefresh 
  106.                Height          =   330
  107.                Left            =   4440
  108.                TabIndex        =   32
  109.                Top             =   240
  110.                Width           =   1095
  111.                _Version        =   65536
  112.                _ExtentX        =   1931
  113.                _ExtentY        =   573
  114.                _StockProps     =   78
  115.                Caption         =   "&R.刷 新"
  116.                Font3D          =   1
  117.             End
  118.             Begin Threed.SSCommand CmdAdd 
  119.                Height          =   330
  120.                Left            =   840
  121.                TabIndex        =   10
  122.                Top             =   240
  123.                Width           =   1095
  124.                _Version        =   65536
  125.                _ExtentX        =   1931
  126.                _ExtentY        =   573
  127.                _StockProps     =   78
  128.                Caption         =   "&A.增 加"
  129.                Font3D          =   1
  130.             End
  131.             Begin Threed.SSCommand cmdEdit 
  132.                Height          =   330
  133.                Left            =   2040
  134.                TabIndex        =   11
  135.                Top             =   240
  136.                Width           =   1095
  137.                _Version        =   65536
  138.                _ExtentX        =   1931
  139.                _ExtentY        =   573
  140.                _StockProps     =   78
  141.                Caption         =   "&E.编 辑"
  142.                Font3D          =   1
  143.             End
  144.             Begin Threed.SSCommand CmdDelete 
  145.                Height          =   330
  146.                Left            =   3240
  147.                TabIndex        =   12
  148.                Top             =   240
  149.                Width           =   1095
  150.                _Version        =   65536
  151.                _ExtentX        =   1931
  152.                _ExtentY        =   573
  153.                _StockProps     =   78
  154.                Caption         =   "&D.删 除"
  155.                Font3D          =   1
  156.             End
  157.             Begin Threed.SSCommand cmdCancel 
  158.                Height          =   330
  159.                Left            =   5640
  160.                TabIndex        =   14
  161.                Top             =   240
  162.                Width           =   1095
  163.                _Version        =   65536
  164.                _ExtentX        =   1931
  165.                _ExtentY        =   573
  166.                _StockProps     =   78
  167.                Caption         =   "&C.取消"
  168.                Font3D          =   1
  169.             End
  170.             Begin Threed.SSCommand cmdUpdate 
  171.                Height          =   330
  172.                Left            =   4440
  173.                TabIndex        =   13
  174.                Top             =   240
  175.                Width           =   1095
  176.                _Version        =   65536
  177.                _ExtentX        =   1931
  178.                _ExtentY        =   573
  179.                _StockProps     =   78
  180.                Caption         =   "&Y.保存"
  181.                Font3D          =   1
  182.             End
  183.          End
  184.          Begin VB.Frame Frame4 
  185.             BeginProperty Font 
  186.                Name            =   "MS Sans Serif"
  187.                Size            =   8.25
  188.                Charset         =   0
  189.                Weight          =   400
  190.                Underline       =   0   'False
  191.                Italic          =   0   'False
  192.                Strikethrough   =   0   'False
  193.             EndProperty
  194.             Height          =   4215
  195.             Left            =   -74880
  196.             TabIndex        =   25
  197.             Top             =   480
  198.             Width           =   8655
  199.             Begin MSDataGridLib.DataGrid DataGrid1 
  200.                Height          =   3855
  201.                Left            =   120
  202.                TabIndex        =   26
  203.                Top             =   240
  204.                Width           =   8415
  205.                _ExtentX        =   14843
  206.                _ExtentY        =   6800
  207.                _Version        =   393216
  208.                AllowUpdate     =   0   'False
  209.                HeadLines       =   1
  210.                RowHeight       =   14
  211.                BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  212.                   Name            =   "MS Sans Serif"
  213.                   Size            =   8.25
  214.                   Charset         =   0
  215.                   Weight          =   400
  216.                   Underline       =   0   'False
  217.                   Italic          =   0   'False
  218.                   Strikethrough   =   0   'False
  219.                EndProperty
  220.                BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  221.                   Name            =   "宋体"
  222.                   Size            =   9
  223.                   Charset         =   134
  224.                   Weight          =   400
  225.                   Underline       =   0   'False
  226.                   Italic          =   0   'False
  227.                   Strikethrough   =   0   'False
  228.                EndProperty
  229.                ColumnCount     =   2
  230.                BeginProperty Column00 
  231.                   DataField       =   ""
  232.                   Caption         =   ""
  233.                   BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
  234.                      Type            =   0
  235.                      Format          =   ""
  236.                      HaveTrueFalseNull=   0
  237.                      FirstDayOfWeek  =   0
  238.                      FirstWeekOfYear =   0
  239.                      LCID            =   2052
  240.                      SubFormatType   =   0
  241.                   EndProperty
  242.                EndProperty
  243.                BeginProperty Column01 
  244.                   DataField       =   ""
  245.                   Caption         =   ""
  246.                   BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
  247.                      Type            =   0
  248.                      Format          =   ""
  249.                      HaveTrueFalseNull=   0
  250.                      FirstDayOfWeek  =   0
  251.                      FirstWeekOfYear =   0
  252.                      LCID            =   2052
  253.                      SubFormatType   =   0
  254.                   EndProperty
  255.                EndProperty
  256.                SplitCount      =   1
  257.                BeginProperty Split0 
  258.                   BeginProperty Column00 
  259.                   EndProperty
  260.                   BeginProperty Column01 
  261.                   EndProperty
  262.                EndProperty
  263.             End
  264.          End
  265.          Begin VB.Frame Frame3 
  266.             BeginProperty Font 
  267.                Name            =   "MS Sans Serif"
  268.                Size            =   8.25
  269.                Charset         =   0
  270.                Weight          =   400
  271.                Underline       =   0   'False
  272.                Italic          =   0   'False
  273.                Strikethrough   =   0   'False
  274.             EndProperty
  275.             Height          =   3495
  276.             Left            =   240
  277.             TabIndex        =   17
  278.             Top             =   480
  279.             Width           =   8535
  280.             Begin VB.TextBox txtFields 
  281.                Appearance      =   0  'Flat
  282.                DataField       =   "年度"
  283.                Height          =   285
  284.                Index           =   0
  285.                Left            =   2040
  286.                TabIndex        =   0
  287.                Top             =   360
  288.                Width           =   1935
  289.             End
  290.             Begin MSComCtl2.DTPicker DTPickers 
  291.                DataField       =   "存档结束时间"
  292.                Height          =   300
  293.                Index           =   1
  294.                Left            =   6000
  295.                TabIndex        =   3
  296.                Top             =   960
  297.                Width           =   1935
  298.                _ExtentX        =   3413
  299.                _ExtentY        =   529
  300.                _Version        =   393216
  301.                CheckBox        =   -1  'True
  302.                DateIsNull      =   -1  'True
  303.                Format          =   69795841
  304.                CurrentDate     =   36186
  305.             End
  306.             Begin VB.TextBox txtFields 
  307.                Appearance      =   0  'Flat
  308.                DataField       =   "每人每月费用"
  309.                Height          =   285
  310.                Index           =   2
  311.                Left            =   2040
  312.                TabIndex        =   4
  313.                Top             =   1560
  314.                Width           =   1935
  315.             End
  316.             Begin VB.TextBox txtFields 
  317.                Appearance      =   0  'Flat
  318.                DataField       =   "存档人数"
  319.                Height          =   285
  320.                Index           =   4
  321.                Left            =   6000
  322.                TabIndex        =   5
  323.                Top             =   1560
  324.                Width           =   1935
  325.             End
  326.             Begin VB.TextBox txtFields 
  327.                Appearance      =   0  'Flat
  328.                DataField       =   "公司交款数"
  329.                Height          =   285
  330.                Index           =   5
  331.                Left            =   2040
  332.                TabIndex        =   6
  333.                Top             =   2160
  334.                Width           =   1935
  335.             End
  336.             Begin VB.TextBox txtFields 
  337.                Appearance      =   0  'Flat
  338.                DataField       =   "离职员工应退金额"
  339.                Height          =   285
  340.                Index           =   6
  341.                Left            =   6000
  342.                TabIndex        =   7
  343.                Top             =   2160
  344.                Width           =   1935
  345.             End
  346.             Begin VB.TextBox txtFields 
  347.                Appearance      =   0  'Flat
  348.                DataField       =   "新增人员应补金额"
  349.                Height          =   285
  350.                Index           =   7
  351.                Left            =   2040
  352.                TabIndex        =   8
  353.                Top             =   2760
  354.                Width           =   1935
  355.             End
  356.             Begin VB.TextBox txtFields 
  357.                Appearance      =   0  'Flat
  358.                DataField       =   "实交金额"
  359.                Enabled         =   0   'False
  360.                Height          =   285
  361.                Index           =   8
  362.                Left            =   6000
  363.                TabIndex        =   9
  364.                Top             =   2760
  365.                Width           =   1935
  366.             End
  367.             Begin MSComCtl2.DTPicker DTPickers 
  368.                DataField       =   "结算时间"
  369.                Height          =   300
  370.                Index           =   0
  371.                Left            =   6000
  372.                TabIndex        =   1
  373.                Top             =   360
  374.                Width           =   1935
  375.                _ExtentX        =   3413
  376.                _ExtentY        =   529
  377.                _Version        =   393216
  378.                CheckBox        =   -1  'True
  379.                DateIsNull      =   -1  'True
  380.                Format          =   69795841
  381.                CurrentDate     =   36186
  382.             End
  383.             Begin MSComCtl2.DTPicker DTPickers 
  384.                DataField       =   "存档开始时间"
  385.                Height          =   300
  386.                Index           =   2
  387.                Left            =   2040
  388.                TabIndex        =   2
  389.                Top             =   960
  390.                Width           =   1935
  391.                _ExtentX        =   3413
  392.                _ExtentY        =   529
  393.                _Version        =   393216
  394.                CheckBox        =   -1  'True
  395.                DateIsNull      =   -1  'True
  396.                Format          =   69795841
  397.                CurrentDate     =   36186
  398.             End
  399.             Begin VB.Label lblLabels 
  400.                Caption         =   "结算时间"
  401.                Height          =   255
  402.                Index           =   1
  403.                Left            =   4320
  404.                TabIndex        =   29
  405.                Top             =   360
  406.                Width           =   855
  407.             End
  408.             Begin VB.Label lblLabels 
  409.                Caption         =   "年        度"
  410.                Height          =   255
  411.                Index           =   0
  412.                Left            =   480
  413.                TabIndex        =   28
  414.                Top             =   360
  415.                Width           =   1215
  416.             End
  417.             Begin VB.Label lblLabels 
  418.                Caption         =   "存档开始时间"
  419.                Height          =   255
  420.                Index           =   9
  421.                Left            =   480
  422.                TabIndex        =   27
  423.                Top             =   960
  424.                Width           =   1935
  425.             End
  426.             Begin VB.Label lblLabels 
  427.                Caption         =   "每人每月费用"
  428.                Height          =   255
  429.                Index           =   2
  430.                Left            =   480
  431.                TabIndex        =   24
  432.                Top             =   1560
  433.                Width           =   1935
  434.             End
  435.             Begin VB.Label lblLabels 
  436.                Caption         =   "存档结束时间"
  437.                Height          =   255
  438.                Index           =   3
  439.                Left            =   4320
  440.                TabIndex        =   23
  441.                Top             =   960
  442.                Width           =   1215
  443.             End
  444.             Begin VB.Label lblLabels 
  445.                Caption         =   "存档人数"
  446.                Height          =   255
  447.                Index           =   4
  448.                Left            =   4320
  449.                TabIndex        =   22
  450.                Top             =   1560
  451.                Width           =   1815
  452.             End
  453.             Begin VB.Label lblLabels 
  454.                Caption         =   "公司交款数"
  455.                Height          =   255
  456.                Index           =   5
  457.                Left            =   480
  458.                TabIndex        =   21
  459.                Top             =   2160
  460.                Width           =   1455
  461.             End
  462.             Begin VB.Label lblLabels 
  463.                Caption         =   "离职员工应退金额"
  464.                Height          =   255
  465.                Index           =   6
  466.                Left            =   4320
  467.                TabIndex        =   20
  468.                Top             =   2160
  469.                Width           =   1575
  470.             End
  471.             Begin VB.Label lblLabels 
  472.                Caption         =   "新增人员应补金额"
  473.                Height          =   255
  474.                Index           =   7
  475.                Left            =   480
  476.                TabIndex        =   19
  477.                Top             =   2760
  478.                Width           =   1575
  479.             End
  480.             Begin VB.Label lblLabels 
  481.                Caption         =   "实交金额"
  482.                Height          =   255
  483.                Index           =   8
  484.                Left            =   4320
  485.                TabIndex        =   18
  486.                Top             =   2760
  487.                Width           =   975
  488.             End
  489.          End
  490.       End
  491.    End
  492. End
  493. Attribute VB_Name = "F_CunDangFeiYong"
  494. Attribute VB_GlobalNameSpace = False
  495. Attribute VB_Creatable = False
  496. Attribute VB_PredeclaredId = True
  497. Attribute VB_Exposed = False
  498. Dim WithEvents adoPrimaryRS As Recordset
  499. Attribute adoPrimaryRS.VB_VarHelpID = -1
  500. Dim mvBookMark As Variant
  501. Dim mbEditFlag As Boolean
  502. Private Sub DTPickers_KeyPress(Index As Integer, KeyAscii As Integer)
  503. If KeyAscii = vbKeyReturn Then
  504.     SendKeys "{TAB}"
  505. End If
  506. End Sub
  507. Private Sub Form_Load()
  508. Dim oText As TextBox
  509. Dim oDTP As DTPicker
  510.   
  511.   Set adoPrimaryRS = New Recordset
  512.   adoPrimaryRS.Open "select * from 存档费用", db, adOpenStatic, adLockOptimistic
  513.   
  514.   
  515.   Set DataGrid1.DataSource = adoPrimaryRS
  516.   
  517.   SetButtons True
  518.   
  519.   
  520.   'Bind the text boxes to the data provider
  521.   For Each oText In Me.txtFields
  522.     Set oText.DataSource = adoPrimaryRS
  523.   Next
  524.  
  525.   'Bind the DTPicker to the data provider
  526.   For Each oDTP In Me.DTPickers
  527.     Set oDTP.DataSource = adoPrimaryRS
  528.   Next
  529.   
  530.   Set DTPickers(1).DataSource = adoPrimaryRS
  531.   Set DTPickers(2).DataSource = adoPrimaryRS
  532.   Set DTPickers(0).DataSource = adoPrimaryRS
  533.   
  534. End Sub
  535. Private Sub Form_Unload(Cancel As Integer)
  536.   Screen.MousePointer = vbDefault
  537. End Sub
  538. Private Sub cmdAdd_Click()
  539.   On Error GoTo AddErr
  540.   With adoPrimaryRS
  541.     If Not (.BOF And .EOF) Then
  542.       mvBookMark = .Bookmark
  543.     End If
  544.     .AddNew
  545.     mbAddNewFlag = True
  546.     SetButtons False
  547.   End With
  548.   On Error GoTo 0
  549.   Exit Sub
  550. AddErr:
  551.   MsgBox "增加操作有错误", vbExclamation + vbOKOnly, pTitle
  552.   
  553. End Sub
  554. Private Sub cmdDelete_Click()
  555.   On Error GoTo DeleteErr
  556.   If MsgBox("是否确认删除记录信息?", vbYesNo + vbQuestion, "系统提示") = vbNo Then Exit Sub
  557.   With adoPrimaryRS
  558.     .Delete
  559.     .MoveNext
  560.     If .EOF Then .MoveLast
  561.   End With
  562.   On Error GoTo 0
  563.   Exit Sub
  564. DeleteErr:
  565.   MsgBox "删除操作有错误", vbExclamation + vbOKOnly, pTitle
  566. End Sub
  567. Private Sub cmdRefresh_Click()
  568.   'This is only needed for multi user apps
  569.   On Error GoTo RefreshErr
  570.   adoPrimaryRS.Requery
  571.   On Error GoTo 0
  572.   Exit Sub
  573. RefreshErr:
  574.    MsgBox "刷新操作有错误", vbExclamation + vbOKOnly, pTitle
  575. End Sub
  576. Private Sub cmdEdit_Click()
  577.   On Error GoTo EditErr
  578.   mbEditFlag = True
  579.   SetButtons False
  580.   On Error GoTo 0
  581.   Exit Sub
  582. EditErr:
  583.    MsgBox "更改操作有错误", vbExclamation + vbOKOnly, pTitle
  584. End Sub
  585. Private Sub cmdCancel_Click()
  586.  ' On Error Resume Next
  587.  On Error GoTo CancelErr
  588.   mbEditFlag = False
  589.   mbAddNewFlag = False
  590.   adoPrimaryRS.CancelUpdate
  591.   If mvBookMark > 0 Then
  592.    adoPrimaryRS.Bookmark = mvBookMark
  593.   Else
  594.    adoPrimaryRS.MoveFirst
  595.   End If
  596.  SetButtons True
  597.   Exit Sub
  598. CancelErr:
  599.    
  600.    MsgBox "取消操作有错误", vbExclamation + vbOKOnly, pTitle
  601.   SetButtons True
  602. End Sub
  603. Private Sub cmdUpdate_Click()
  604.   On Error GoTo UpdateErr
  605.   If MsgBox("是否确认此操作?", vbYesNo + vbQuestion, "系统提示") = vbNo Then Exit Sub
  606.   adoPrimaryRS.UpdateBatch adAffectAll
  607.   If mbAddNewFlag Then
  608.     adoPrimaryRS.MoveLast              'move to the new record
  609.   End If
  610.   mbEditFlag = False
  611.   mbAddNewFlag = False
  612.   SetButtons True
  613.   On Error GoTo 0
  614.   Exit Sub
  615. UpdateErr:
  616.    MsgBox "保存操作有错误", vbExclamation + vbOKOnly, pTitle
  617.    SetButtons True
  618. End Sub
  619. Private Sub cmdClose_Click()
  620.   RSGL.Enabled = True
  621.   Unload Me
  622. End Sub
  623. Private Sub SetButtons(bVal As Boolean)
  624. Dim oText As TextBox
  625.   CmdAdd.Visible = bVal
  626.   cmdEdit.Visible = bVal
  627.   cmdUpdate.Visible = Not bVal
  628.   cmdCancel.Visible = Not bVal
  629.   CmdDelete.Visible = bVal
  630.   cmdClose.Visible = bVal
  631.   cmdRefresh.Visible = bVal
  632.   
  633.   For Each oText In Me.txtFields
  634.      oText.Enabled = Not bVal
  635.   Next
  636.   DTPickers(1).Enabled = Not bVal
  637.   DTPickers(2).Enabled = Not bVal
  638.   DTPickers(0).Enabled = Not bVal
  639.   
  640.   If bVal Then
  641.    Set DataGrid1.DataSource = adoPrimaryRS
  642.   Else
  643.    Set DataGrid1.DataSource = Nothing
  644.   End If
  645. End Sub
  646. Private Sub txtFields_Change(Index As Integer)
  647. If IsNumeric(txtFields(2).Text) And IsNumeric(txtFields(4).Text) Then
  648.     txtFields(5).Text = CDbl(txtFields(2)) * CDbl(txtFields(4))
  649. End If
  650. If IsNumeric(txtFields(5).Text) And IsNumeric(txtFields(6).Text) And IsNumeric(txtFields(7).Text) Then
  651.     txtFields(8).Text = CDbl(txtFields(5)) - CDbl(txtFields(6)) + CDbl(txtFields(7))
  652. End If
  653. End Sub
  654. Private Sub txtFields_KeyPress(Index As Integer, KeyAscii As Integer)
  655. If KeyAscii = vbKeyReturn Then
  656.     SendKeys "{TAB}"
  657. End If
  658. End Sub
  659. Private Sub txtFields_LostFocus(Index As Integer)
  660. If Not IsNumeric(txtFields(0).Text) And (txtFields(0).Text <> "") Then
  661.     MsgBox "请在“年度”中输入数字", vbExclamation + vbOKOnly, pTitle
  662.      txtFields(0).SetFocus
  663.      txtFields(0).SelLength = Len(txtFields(0))
  664.      txtFields(0).SelStart = 0
  665. End If
  666. If Not IsNumeric(txtFields(2).Text) And (txtFields(2).Text <> "") Then
  667.     MsgBox "请在“每人每月应交钱数”中输入数字", vbExclamation + vbOKOnly, pTitle
  668.      txtFields(2).SetFocus
  669.      txtFields(2).SelLength = Len(txtFields(2))
  670.      txtFields(2).SelStart = 0
  671. End If
  672. If Not IsNumeric(txtFields(4).Text) And (txtFields(4).Text <> "") Then
  673.     MsgBox "请在“整个公司存档人数”中输入数字", vbExclamation + vbOKOnly, pTitle
  674.      txtFields(4).SetFocus
  675.      txtFields(4).SelLength = Len(txtFields(4))
  676.      txtFields(4).SelStart = 0
  677. End If
  678. If Not IsNumeric(txtFields(5).Text) And (txtFields(5).Text <> "") Then
  679.     MsgBox "请在“整个公司交款数”中输入数字", vbExclamation + vbOKOnly, pTitle
  680.      txtFields(5).SetFocus
  681.      txtFields(5).SelLength = Len(txtFields(5))
  682.      txtFields(5).SelStart = 0
  683. End If
  684. If Not IsNumeric(txtFields(6).Text) And (txtFields(6).Text <> "") Then
  685.     MsgBox "请在“离职员工应退钱数”中输入数字", vbExclamation + vbOKOnly, pTitle
  686.      txtFields(6).SetFocus
  687.      txtFields(6).SelLength = Len(txtFields(6))
  688.      txtFields(6).SelStart = 0
  689. End If
  690. If Not IsNumeric(txtFields(7).Text) And (txtFields(7).Text <> "") Then
  691.     MsgBox "请在“新增人员应补钱数”中输入数字", vbExclamation + vbOKOnly, pTitle
  692.      txtFields(7).SetFocus
  693.      txtFields(7).SelLength = Len(txtFields(7))
  694.      txtFields(7).SelStart = 0
  695. End If
  696. End Sub