F_LaoDongHeTongLiShi.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 = "{0BA686C6-F7D3-101A-993E-0000C0EF6F5E}#1.0#0"; "THREED32.OCX"
  5. Begin VB.Form F_LaoDongHeTongLiShi 
  6.    BorderStyle     =   3  'Fixed Dialog
  7.    Caption         =   "劳动合同历史"
  8.    ClientHeight    =   7560
  9.    ClientLeft      =   45
  10.    ClientTop       =   330
  11.    ClientWidth     =   10005
  12.    ControlBox      =   0   'False
  13.    LinkTopic       =   "Form1"
  14.    LockControls    =   -1  'True
  15.    MaxButton       =   0   'False
  16.    MinButton       =   0   'False
  17.    Moveable        =   0   'False
  18.    ScaleHeight     =   7560
  19.    ScaleWidth      =   10005
  20.    ShowInTaskbar   =   0   'False
  21.    StartUpPosition =   2  '屏幕中心
  22.    Begin VB.Frame Frame1 
  23.       Caption         =   "选择查询条件"
  24.       Height          =   1455
  25.       Left            =   120
  26.       TabIndex        =   50
  27.       Top             =   0
  28.       Width           =   9735
  29.       Begin Threed.SSCommand Command1 
  30.          Height          =   375
  31.          Left            =   6120
  32.          TabIndex        =   2
  33.          Top             =   840
  34.          Width           =   1095
  35.          _Version        =   65536
  36.          _ExtentX        =   1931
  37.          _ExtentY        =   661
  38.          _StockProps     =   78
  39.          Caption         =   "&S.查 询"
  40.          Font3D          =   1
  41.       End
  42.       Begin VB.CheckBox Check1 
  43.          Caption         =   "Check1"
  44.          Height          =   255
  45.          Left            =   360
  46.          TabIndex        =   52
  47.          Top             =   390
  48.          Width           =   255
  49.       End
  50.       Begin VB.ComboBox Combo2 
  51.          Height          =   300
  52.          Left            =   1800
  53.          TabIndex        =   1
  54.          Top             =   840
  55.          Visible         =   0   'False
  56.          Width           =   1695
  57.       End
  58.       Begin VB.ComboBox Command3 
  59.          Height          =   300
  60.          Left            =   1800
  61.          TabIndex        =   0
  62.          Top             =   360
  63.          Visible         =   0   'False
  64.          Width           =   1695
  65.       End
  66.       Begin VB.CheckBox Check3 
  67.          Caption         =   "Check2"
  68.          Height          =   255
  69.          Left            =   360
  70.          TabIndex        =   51
  71.          Top             =   870
  72.          Width           =   255
  73.       End
  74.       Begin Threed.SSCommand Command2 
  75.          Height          =   375
  76.          Left            =   7800
  77.          TabIndex        =   3
  78.          Top             =   840
  79.          Width           =   1095
  80.          _Version        =   65536
  81.          _ExtentX        =   1931
  82.          _ExtentY        =   661
  83.          _StockProps     =   78
  84.          Caption         =   "&Q.关 闭"
  85.          Font3D          =   1
  86.       End
  87.       Begin VB.Label Label1 
  88.          Caption         =   "员工编号"
  89.          Height          =   255
  90.          Left            =   720
  91.          TabIndex        =   54
  92.          Top             =   400
  93.          Width           =   975
  94.       End
  95.       Begin VB.Label Label3 
  96.          Caption         =   "员工姓名"
  97.          Height          =   255
  98.          Left            =   720
  99.          TabIndex        =   53
  100.          Top             =   900
  101.          Width           =   975
  102.       End
  103.    End
  104.    Begin VB.Frame Frame2 
  105.       Caption         =   "查询结果"
  106.       Height          =   5895
  107.       Left            =   120
  108.       TabIndex        =   5
  109.       Top             =   1560
  110.       Width           =   9735
  111.       Begin MSDataGridLib.DataGrid DataGrid1 
  112.          Height          =   4935
  113.          Left            =   240
  114.          TabIndex        =   6
  115.          Top             =   360
  116.          Width           =   9135
  117.          _ExtentX        =   16113
  118.          _ExtentY        =   8705
  119.          _Version        =   393216
  120.          HeadLines       =   1
  121.          RowHeight       =   15
  122.          BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  123.             Name            =   "MS Sans Serif"
  124.             Size            =   8.25
  125.             Charset         =   0
  126.             Weight          =   400
  127.             Underline       =   0   'False
  128.             Italic          =   0   'False
  129.             Strikethrough   =   0   'False
  130.          EndProperty
  131.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  132.             Name            =   "MS Sans Serif"
  133.             Size            =   8.25
  134.             Charset         =   0
  135.             Weight          =   400
  136.             Underline       =   0   'False
  137.             Italic          =   0   'False
  138.             Strikethrough   =   0   'False
  139.          EndProperty
  140.          ColumnCount     =   2
  141.          BeginProperty Column00 
  142.             DataField       =   ""
  143.             Caption         =   ""
  144.             BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
  145.                Type            =   0
  146.                Format          =   ""
  147.                HaveTrueFalseNull=   0
  148.                FirstDayOfWeek  =   0
  149.                FirstWeekOfYear =   0
  150.                LCID            =   2052
  151.                SubFormatType   =   0
  152.             EndProperty
  153.          EndProperty
  154.          BeginProperty Column01 
  155.             DataField       =   ""
  156.             Caption         =   ""
  157.             BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
  158.                Type            =   0
  159.                Format          =   ""
  160.                HaveTrueFalseNull=   0
  161.                FirstDayOfWeek  =   0
  162.                FirstWeekOfYear =   0
  163.                LCID            =   2052
  164.                SubFormatType   =   0
  165.             EndProperty
  166.          EndProperty
  167.          SplitCount      =   1
  168.          BeginProperty Split0 
  169.             BeginProperty Column00 
  170.             EndProperty
  171.             BeginProperty Column01 
  172.             EndProperty
  173.          EndProperty
  174.       End
  175.       Begin Threed.SSCommand SSCommand1 
  176.          Height          =   375
  177.          Left            =   7920
  178.          TabIndex        =   4
  179.          Top             =   5400
  180.          Width           =   1095
  181.          _Version        =   65536
  182.          _ExtentX        =   1931
  183.          _ExtentY        =   661
  184.          _StockProps     =   78
  185.          Caption         =   "&X.显 示"
  186.          Font3D          =   1
  187.       End
  188.    End
  189.    Begin VB.Frame Frame3 
  190.       Height          =   5895
  191.       Left            =   120
  192.       TabIndex        =   7
  193.       Top             =   1560
  194.       Width           =   9735
  195.       Begin VB.TextBox txtFields 
  196.          Appearance      =   0  'Flat
  197.          DataField       =   "当事人约定的其他内容"
  198.          Height          =   765
  199.          Index           =   16
  200.          Left            =   1680
  201.          TabIndex        =   23
  202.          Top             =   3840
  203.          Width           =   4815
  204.       End
  205.       Begin VB.TextBox txtFields 
  206.          Appearance      =   0  'Flat
  207.          DataField       =   "岗位"
  208.          Height          =   285
  209.          Index           =   15
  210.          Left            =   4800
  211.          TabIndex        =   22
  212.          Top             =   2288
  213.          Width           =   1695
  214.       End
  215.       Begin VB.TextBox txtFields 
  216.          Appearance      =   0  'Flat
  217.          DataField       =   "部门"
  218.          Height          =   285
  219.          Index           =   14
  220.          Left            =   1680
  221.          TabIndex        =   21
  222.          Top             =   2288
  223.          Width           =   1695
  224.       End
  225.       Begin VB.TextBox txtFields 
  226.          Appearance      =   0  'Flat
  227.          DataField       =   "所在街道办事处"
  228.          Height          =   285
  229.          Index           =   9
  230.          Left            =   1680
  231.          TabIndex        =   20
  232.          Top             =   1800
  233.          Width           =   4815
  234.       End
  235.       Begin VB.TextBox txtFields 
  236.          Appearance      =   0  'Flat
  237.          DataField       =   "邮编"
  238.          Height          =   285
  239.          Index           =   8
  240.          Left            =   7920
  241.          TabIndex        =   19
  242.          Top             =   840
  243.          Width           =   1695
  244.       End
  245.       Begin VB.TextBox txtFields 
  246.          Appearance      =   0  'Flat
  247.          DataField       =   "家庭通讯地址"
  248.          Height          =   285
  249.          Index           =   7
  250.          Left            =   1680
  251.          TabIndex        =   18
  252.          Top             =   1320
  253.          Width           =   4815
  254.       End
  255.       Begin VB.TextBox txtFields 
  256.          Appearance      =   0  'Flat
  257.          DataField       =   "身份证号"
  258.          Height          =   285
  259.          Index           =   6
  260.          Left            =   7920
  261.          TabIndex        =   17
  262.          Top             =   1320
  263.          Width           =   1695
  264.       End
  265.       Begin VB.TextBox txtFields 
  266.          Appearance      =   0  'Flat
  267.          DataField       =   "性别"
  268.          Height          =   285
  269.          Index           =   4
  270.          Left            =   1680
  271.          TabIndex        =   16
  272.          Top             =   840
  273.          Width           =   1695
  274.       End
  275.       Begin VB.TextBox txtFields 
  276.          Appearance      =   0  'Flat
  277.          DataField       =   "文化程度"
  278.          Height          =   285
  279.          Index           =   3
  280.          Left            =   7920
  281.          TabIndex        =   15
  282.          Top             =   360
  283.          Width           =   1695
  284.       End
  285.       Begin VB.TextBox txtFields 
  286.          Appearance      =   0  'Flat
  287.          DataField       =   "姓名"
  288.          Height          =   285
  289.          Index           =   1
  290.          Left            =   4920
  291.          TabIndex        =   14
  292.          Top             =   360
  293.          Width           =   1575
  294.       End
  295.       Begin VB.TextBox txtFields 
  296.          Appearance      =   0  'Flat
  297.          DataField       =   "劳动合同编号"
  298.          Height          =   285
  299.          Index           =   0
  300.          Left            =   1680
  301.          TabIndex        =   13
  302.          Top             =   360
  303.          Width           =   1695
  304.       End
  305.       Begin VB.ComboBox Combo4 
  306.          Appearance      =   0  'Flat
  307.          DataField       =   "停止方式"
  308.          Height          =   300
  309.          Left            =   4800
  310.          TabIndex        =   10
  311.          Top             =   4793
  312.          Width           =   1695
  313.       End
  314.       Begin VB.TextBox txtFields 
  315.          Appearance      =   0  'Flat
  316.          DataField       =   "签定期限"
  317.          Height          =   285
  318.          Index           =   2
  319.          Left            =   1680
  320.          TabIndex        =   9
  321.          Top             =   2768
  322.          Width           =   1695
  323.       End
  324.       Begin VB.ComboBox Combo3 
  325.          Appearance      =   0  'Flat
  326.          DataField       =   "是否已停止"
  327.          Height          =   300
  328.          Left            =   1680
  329.          TabIndex        =   8
  330.          Top             =   4793
  331.          Width           =   1695
  332.       End
  333.       Begin MSComCtl2.DTPicker DTPicker3 
  334.          DataField       =   "出生日期"
  335.          BeginProperty DataFormat 
  336.             Type            =   1
  337.             Format          =   "yyyy""年""M""月""d""日"""
  338.             HaveTrueFalseNull=   0
  339.             FirstDayOfWeek  =   0
  340.             FirstWeekOfYear =   0
  341.             LCID            =   2052
  342.             SubFormatType   =   3
  343.          EndProperty
  344.          Height          =   300
  345.          Left            =   4920
  346.          TabIndex        =   11
  347.          Top             =   832
  348.          Width           =   1575
  349.          _ExtentX        =   2778
  350.          _ExtentY        =   529
  351.          _Version        =   393216
  352.          CheckBox        =   -1  'True
  353.          DateIsNull      =   -1  'True
  354.          Format          =   127533057
  355.          CurrentDate     =   36189
  356.       End
  357.       Begin MSComCtl2.DTPicker DTPicker4 
  358.          DataField       =   "签定时间"
  359.          Height          =   300
  360.          Left            =   7920
  361.          TabIndex        =   12
  362.          Top             =   2280
  363.          Width           =   1695
  364.          _ExtentX        =   2990
  365.          _ExtentY        =   529
  366.          _Version        =   393216
  367.          CheckBox        =   -1  'True
  368.          DateIsNull      =   -1  'True
  369.          Format          =   127533057
  370.          CurrentDate     =   36186
  371.       End
  372.       Begin MSComCtl2.DTPicker DTPicker5 
  373.          DataField       =   "结束时间"
  374.          Height          =   300
  375.          Left            =   7920
  376.          TabIndex        =   24
  377.          Top             =   2760
  378.          Width           =   1695
  379.          _ExtentX        =   2990
  380.          _ExtentY        =   529
  381.          _Version        =   393216
  382.          CheckBox        =   -1  'True
  383.          DateIsNull      =   -1  'True
  384.          Format          =   127533057
  385.          CurrentDate     =   36186
  386.       End
  387.       Begin MSComCtl2.DTPicker DTPicker6 
  388.          DataField       =   "开始时间"
  389.          Height          =   300
  390.          Left            =   4800
  391.          TabIndex        =   25
  392.          Top             =   2760
  393.          Width           =   1695
  394.          _ExtentX        =   2990
  395.          _ExtentY        =   529
  396.          _Version        =   393216
  397.          CheckBox        =   -1  'True
  398.          DateIsNull      =   -1  'True
  399.          Format          =   127533057
  400.          CurrentDate     =   36186
  401.       End
  402.       Begin MSComCtl2.DTPicker DTPicker7 
  403.          DataField       =   "试用开始时间"
  404.          Height          =   300
  405.          Left            =   1680
  406.          TabIndex        =   26
  407.          Top             =   3360
  408.          Width           =   1695
  409.          _ExtentX        =   2990
  410.          _ExtentY        =   529
  411.          _Version        =   393216
  412.          CheckBox        =   -1  'True
  413.          DateIsNull      =   -1  'True
  414.          Format          =   127533057
  415.          CurrentDate     =   36186
  416.       End
  417.       Begin MSComCtl2.DTPicker DTPicker8 
  418.          DataField       =   "试用结束时间"
  419.          Height          =   300
  420.          Left            =   4800
  421.          TabIndex        =   27
  422.          Top             =   3360
  423.          Width           =   1695
  424.          _ExtentX        =   2990
  425.          _ExtentY        =   529
  426.          _Version        =   393216
  427.          CheckBox        =   -1  'True
  428.          DateIsNull      =   -1  'True
  429.          Format          =   127533057
  430.          CurrentDate     =   36186
  431.       End
  432.       Begin MSComCtl2.DTPicker DTPicker9 
  433.          DataField       =   "停止时间"
  434.          Height          =   300
  435.          Left            =   7920
  436.          TabIndex        =   28
  437.          Top             =   4800
  438.          Width           =   1695
  439.          _ExtentX        =   2990
  440.          _ExtentY        =   529
  441.          _Version        =   393216
  442.          CheckBox        =   -1  'True
  443.          DateIsNull      =   -1  'True
  444.          Format          =   127533057
  445.          CurrentDate     =   36186
  446.       End
  447.       Begin Threed.SSCommand CmdXianShi_Exit 
  448.          Height          =   375
  449.          Left            =   8160
  450.          TabIndex        =   55
  451.          Top             =   5280
  452.          Width           =   1095
  453.          _Version        =   65536
  454.          _ExtentX        =   1931
  455.          _ExtentY        =   661
  456.          _StockProps     =   78
  457.          Caption         =   "&E.关 闭"
  458.          Font3D          =   1
  459.       End
  460.       Begin VB.Label lblLabels 
  461.          Caption         =   "停止时间"
  462.          Height          =   255
  463.          Index           =   18
  464.          Left            =   6720
  465.          TabIndex        =   49
  466.          Top             =   4823
  467.          Width           =   1095
  468.       End
  469.       Begin VB.Label lblLabels 
  470.          Caption         =   "停止方式"
  471.          Height          =   255
  472.          Index           =   17
  473.          Left            =   3720
  474.          TabIndex        =   48
  475.          Top             =   4823
  476.          Width           =   1215
  477.       End
  478.       Begin VB.Label lblLabels 
  479.          Caption         =   "当事人约定的其他内容"
  480.          Height          =   495
  481.          Index           =   16
  482.          Left            =   360
  483.          TabIndex        =   47
  484.          Top             =   3840
  485.          Width           =   1095
  486.       End
  487.       Begin VB.Label lblLabels 
  488.          Caption         =   "岗位:"
  489.          Height          =   255
  490.          Index           =   15
  491.          Left            =   3600
  492.          TabIndex        =   46
  493.          Top             =   2303
  494.          Width           =   615
  495.       End
  496.       Begin VB.Label lblLabels 
  497.          Caption         =   "部  门"
  498.          Height          =   255
  499.          Index           =   14
  500.          Left            =   360
  501.          TabIndex        =   45
  502.          Top             =   2303
  503.          Width           =   735
  504.       End
  505.       Begin VB.Label lblLabels 
  506.          Caption         =   "试用结束时间"
  507.          Height          =   255
  508.          Index           =   13
  509.          Left            =   3480
  510.          TabIndex        =   44
  511.          Top             =   3383
  512.          Width           =   1095
  513.       End
  514.       Begin VB.Label lblLabels 
  515.          Caption         =   "试用开始时间"
  516.          Height          =   255
  517.          Index           =   12
  518.          Left            =   360
  519.          TabIndex        =   43
  520.          Top             =   3383
  521.          Width           =   1215
  522.       End
  523.       Begin VB.Label lblLabels 
  524.          Caption         =   "结束时间"
  525.          Height          =   255
  526.          Index           =   11
  527.          Left            =   6720
  528.          TabIndex        =   42
  529.          Top             =   2783
  530.          Width           =   975
  531.       End
  532.       Begin VB.Label lblLabels 
  533.          Caption         =   "开始时间:"
  534.          DataField       =   $"F_LaoDongHeTongLiShi.frx":0000
  535.          Height          =   255
  536.          Index           =   10
  537.          Left            =   3600
  538.          TabIndex        =   41
  539.          Top             =   2783
  540.          Width           =   1215
  541.       End
  542.       Begin VB.Label lblLabels 
  543.          Caption         =   "所在街道办事处"
  544.          Height          =   255
  545.          Index           =   9
  546.          Left            =   360
  547.          TabIndex        =   40
  548.          Top             =   1800
  549.          Width           =   1335
  550.       End
  551.       Begin VB.Label lblLabels 
  552.          Caption         =   "邮  编"
  553.          Height          =   255
  554.          Index           =   8
  555.          Left            =   6720
  556.          TabIndex        =   39
  557.          Top             =   855
  558.          Width           =   615
  559.       End
  560.       Begin VB.Label lblLabels 
  561.          Caption         =   "家庭通讯地址"
  562.          Height          =   255
  563.          Index           =   7
  564.          Left            =   360
  565.          TabIndex        =   38
  566.          Top             =   1335
  567.          Width           =   1215
  568.       End
  569.       Begin VB.Label lblLabels 
  570.          Caption         =   "身份证号"
  571.          Height          =   255
  572.          Index           =   6
  573.          Left            =   6720
  574.          TabIndex        =   37
  575.          Top             =   1335
  576.          Width           =   855
  577.       End
  578.       Begin VB.Label lblLabels 
  579.          Caption         =   "出生日期:"
  580.          Height          =   255
  581.          Index           =   5
  582.          Left            =   3600
  583.          TabIndex        =   36
  584.          Top             =   855
  585.          Width           =   855
  586.       End
  587.       Begin VB.Label lblLabels 
  588.          Caption         =   "性  别"
  589.          Height          =   255
  590.          Index           =   4
  591.          Left            =   360
  592.          TabIndex        =   35
  593.          Top             =   855
  594.          Width           =   735
  595.       End
  596.       Begin VB.Label lblLabels 
  597.          Caption         =   "文化程度"
  598.          Height          =   255
  599.          Index           =   3
  600.          Left            =   6720
  601.          TabIndex        =   34
  602.          Top             =   375
  603.          Width           =   735
  604.       End
  605.       Begin VB.Label lblLabels 
  606.          Caption         =   "签定时间:"
  607.          Height          =   255
  608.          Index           =   2
  609.          Left            =   6720
  610.          TabIndex        =   33
  611.          Top             =   2303
  612.          Width           =   855
  613.       End
  614.       Begin VB.Label lblLabels 
  615.          Caption         =   "姓  名"
  616.          Height          =   255
  617.          Index           =   1
  618.          Left            =   3600
  619.          TabIndex        =   32
  620.          Top             =   375
  621.          Width           =   1095
  622.       End
  623.       Begin VB.Label lblLabels 
  624.          Caption         =   "劳动合同编号"
  625.          Height          =   255
  626.          Index           =   0
  627.          Left            =   360
  628.          TabIndex        =   31
  629.          Top             =   375
  630.          Width           =   1215
  631.       End
  632.       Begin VB.Label lblLabels 
  633.          Caption         =   "签定期限:"
  634.          DataField       =   $"F_LaoDongHeTongLiShi.frx":00C8
  635.          Height          =   255
  636.          Index           =   19
  637.          Left            =   360
  638.          TabIndex        =   30
  639.          Top             =   2783
  640.          Width           =   1215
  641.       End
  642.       Begin VB.Label lblLabels 
  643.          Caption         =   "是否已停止"
  644.          Height          =   255
  645.          Index           =   20
  646.          Left            =   360
  647.          TabIndex        =   29
  648.          Top             =   4823
  649.          Width           =   1215
  650.       End
  651.    End
  652. End
  653. Attribute VB_Name = "F_LaoDongHeTongLiShi"
  654. Attribute VB_GlobalNameSpace = False
  655. Attribute VB_Creatable = False
  656. Attribute VB_PredeclaredId = True
  657. Attribute VB_Exposed = False
  658. Dim WithEvents rs As Recordset
  659. Attribute rs.VB_VarHelpID = -1
  660. Dim WithEvents adoPrimaryRS As Recordset
  661. Attribute adoPrimaryRS.VB_VarHelpID = -1
  662. Dim WithEvents adoXianshiRS As Recordset
  663. Attribute adoXianshiRS.VB_VarHelpID = -1
  664. Dim Row_ID As String  '为找到ID 的查询SQL 语句
  665. Private Sub Check1_Click()
  666. If Check1.Value = 1 Then
  667.     
  668.     Check3.Value = 0
  669.    
  670.     Combo1.Clear
  671.     
  672.     Sql = "select distinct 劳动合同编号 from 劳动合同  "
  673.     Set rs = db.Execute(Sql)
  674.     
  675.     Do While Not rs.EOF
  676.             If IsNull(rs("劳动合同编号")) = False Then
  677.                 Combo1.AddItem rs("劳动合同编号")
  678.             End If
  679.             rs.MoveNext
  680.     Loop
  681.     Combo1.Visible = True
  682.     Combo2.Visible = False
  683.     
  684.     Frame2.Visible = False
  685.     Frame3.Visible = False
  686. End If
  687. End Sub
  688. Private Sub Check3_Click()
  689.  Check1.Value = 0
  690.  
  691.    
  692.     Combo2.Clear
  693.     
  694.     Sql = "select distinct 姓名 from 劳动合同"
  695.     Set rs = db.Execute(Sql)
  696.     
  697.     Do While Not rs.EOF
  698.             If IsNull(rs("姓名")) = False Then
  699.                 Combo2.AddItem rs("姓名")
  700.             End If
  701.             rs.MoveNext
  702.     Loop
  703.     Combo2.Visible = True
  704.     Combo1.Visible = False
  705.     
  706.     Frame2.Visible = False
  707.     Frame3.Visible = False
  708. End Sub
  709. Private Sub CmdXianShi_Exit_Click()
  710.     Frame2.Visible = True
  711.     Frame3.Visible = False
  712. End Sub
  713. Private Sub Command1_Click()
  714. Dim DataGrid_sql  As String  '数据表格中的数据源
  715. Dim oText As TextBox
  716.    If Check1.Value = 1 Then
  717.          
  718.         DataGrid_sql = "select * from 劳动合同  where  劳动合同编号  ='" & Combo1.Text & "'"
  719.         
  720.    End If
  721.   If Check3.Value = 1 Then
  722.     
  723.       DataGrid_sql = "select * from 劳动合同   where  姓名  ='" & Combo2.Text & "'"
  724.     
  725.     End If
  726.     
  727.     Set adoPrimaryRS = New Recordset
  728.     adoPrimaryRS.Open DataGrid_sql, db, adOpenStatic, adLockOptimistic
  729.     Set DataGrid1.DataSource = adoPrimaryRS
  730.     
  731.           
  732.     Frame3.Visible = False
  733.     Frame2.Visible = True
  734. End Sub
  735. Private Sub Command2_Click()
  736.     RSGL.Enabled = True
  737.     Unload Me
  738. End Sub
  739. Private Sub DataGrid1_Click()
  740.   If Not adoPrimaryRS.BOF And Not adoPrimaryRS.EOF Then
  741.       If Not IsNull(adoPrimaryRS.Fields("ID")) Then
  742.           Row_ID = adoPrimaryRS.Fields("ID")
  743.       Else
  744.           MsgBox "请您选择其中一条信息!"
  745.       End If
  746.    Else
  747.     Exit Sub
  748.   End If
  749.   
  750. End Sub
  751. Private Sub Form_Load()
  752. On Error Resume Next
  753.     For Each TextBox In Me.Controls
  754.         TextBox.Font.Name = "宋体"
  755.         TextBox.Font.Size = 9
  756.     Next
  757. Frame2.Visible = False
  758. Frame3.Visible = False
  759. For Each oText In Me.txtFields
  760.    oText.Locked = True
  761. Next
  762.  DTPicker3.Enabled = True
  763.  DTPicker4.Enabled = True
  764.  DTPicker5.Enabled = True
  765.  DTPicker6.Enabled = True
  766.  DTPicker7.Enabled = True
  767.  DTPicker8.Enabled = True
  768.  DTPicker9.Enabled = True
  769.  Combo3.Enabled = True
  770. End Sub
  771. Private Sub SSCommand1_Click()
  772. Dim XianShi_sql    As String '单条数据显示的数据源
  773.   If Row_ID = "" Then
  774.     MsgBox "请您选择其中一条信息!"
  775.     Exit Sub
  776.   Else
  777.     XianShi_sql = "select * from 劳动合同  where ID = " & Row_ID
  778.     
  779.     Set adoXianshiRS = New Recordset
  780.     adoXianshiRS.Open XianShi_sql, db, adOpenStatic, adLockOptimistic
  781.          
  782.    
  783.     For Each oText In Me.txtFields
  784.           Set oText.DataSource = adoXianshiRS
  785.     Next
  786.     
  787.     Set DTPicker3.DataSource = adoXianshiRS
  788.     Set DTPicker4.DataSource = adoXianshiRS
  789.     Set DTPicker5.DataSource = adoXianshiRS
  790.     Set DTPicker6.DataSource = adoXianshiRS
  791.     Set DTPicker7.DataSource = adoXianshiRS
  792.     Set DTPicker8.DataSource = adoXianshiRS
  793.     Set DTPicker9.DataSource = adoXianshiRS
  794.     
  795.     Set Combo3.DataSource = adoXianshiRS
  796.     Set Combo4.DataSource = adoXianshiRS
  797.    
  798.   
  799. End If
  800.   
  801.   Frame2.Visible = False
  802.   Frame3.Visible = True
  803.        
  804. End Sub