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

企业管理

开发平台:

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