home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1996 February / PCWK0296.iso / po7_win / object10 / dempodc.frm < prev    next >
Text File  |  1994-11-14  |  12KB  |  376 lines

  1. VERSION 2.00
  2. Begin Form frmDeptEmp 
  3.    BorderStyle     =   3  'Fixed Double
  4.    Caption         =   "Dept-Emp Master Detail Form"
  5.    ClientHeight    =   4905
  6.    ClientLeft      =   2355
  7.    ClientTop       =   2235
  8.    ClientWidth     =   6495
  9.    Height          =   5595
  10.    Left            =   2295
  11.    LinkTopic       =   "Form1"
  12.    MaxButton       =   0   'False
  13.    ScaleHeight     =   4905
  14.    ScaleWidth      =   6495
  15.    Top             =   1605
  16.    Width           =   6615
  17.    Begin TextBox txtLoc 
  18.       DataField       =   "loc"
  19.       DataSource      =   "DeptData"
  20.       Height          =   285
  21.       Left            =   2640
  22.       TabIndex        =   2
  23.       Top             =   840
  24.       Width           =   2775
  25.    End
  26.    Begin TextBox txtEmpDeptno 
  27.       DataField       =   "deptno"
  28.       DataSource      =   "EmpData"
  29.       Height          =   285
  30.       Left            =   2640
  31.       TabIndex        =   11
  32.       Top             =   4200
  33.       Width           =   1215
  34.    End
  35.    Begin TextBox txtDname 
  36.       DataField       =   "dname"
  37.       DataSource      =   "DeptData"
  38.       Height          =   285
  39.       Left            =   2640
  40.       TabIndex        =   1
  41.       Top             =   480
  42.       Width           =   2775
  43.    End
  44.    Begin TextBox txtDeptno 
  45.       DataField       =   "deptno"
  46.       DataSource      =   "DeptData"
  47.       Height          =   285
  48.       Left            =   2640
  49.       TabIndex        =   0
  50.       Top             =   120
  51.       Width           =   1215
  52.    End
  53.    Begin OraData DeptData 
  54.       AllowMoveLast   =   -1  'True
  55.       AutoBinding     =   -1  'True
  56.       Caption         =   "      Previous Department -- Next Department"
  57.       Connect         =   ""
  58.       DatabaseName    =   ""
  59.       Height          =   270
  60.       HiddenName      =   "DeptData"
  61.       Left            =   360
  62.       Options         =   2162688
  63.       ReadOnly        =   0   'False
  64.       RecordSource    =   ""
  65.       TabIndex        =   3
  66.       Top             =   1200
  67.       TrailingBlanks  =   0   'False
  68.       Width           =   5535
  69.    End
  70.    Begin TextBox txtComm 
  71.       DataField       =   "comm"
  72.       DataSource      =   "EmpData"
  73.       Height          =   285
  74.       Left            =   2640
  75.       TabIndex        =   10
  76.       Top             =   3840
  77.       Width           =   1215
  78.    End
  79.    Begin TextBox txtSal 
  80.       DataField       =   "sal"
  81.       DataSource      =   "EmpData"
  82.       Height          =   285
  83.       Left            =   2640
  84.       TabIndex        =   9
  85.       Top             =   3480
  86.       Width           =   1215
  87.    End
  88.    Begin TextBox txtHireDate 
  89.       DataField       =   "hiredate"
  90.       DataSource      =   "EmpData"
  91.       Height          =   285
  92.       Left            =   2640
  93.       TabIndex        =   8
  94.       Top             =   3120
  95.       Width           =   1215
  96.    End
  97.    Begin TextBox txtMgr 
  98.       DataField       =   "mgr"
  99.       DataSource      =   "EmpData"
  100.       Height          =   285
  101.       Left            =   2640
  102.       TabIndex        =   7
  103.       Top             =   2760
  104.       Width           =   1215
  105.    End
  106.    Begin TextBox txtJob 
  107.       DataField       =   "job"
  108.       DataSource      =   "EmpData"
  109.       Height          =   285
  110.       Left            =   2640
  111.       TabIndex        =   6
  112.       Top             =   2400
  113.       Width           =   2775
  114.    End
  115.    Begin TextBox txtEname 
  116.       DataField       =   "ename"
  117.       DataSource      =   "EmpData"
  118.       Height          =   285
  119.       Left            =   2640
  120.       TabIndex        =   5
  121.       Top             =   2040
  122.       Width           =   2775
  123.    End
  124.    Begin TextBox txtEmpno 
  125.       DataField       =   "empno"
  126.       DataSource      =   "EmpData"
  127.       Height          =   285
  128.       Left            =   2640
  129.       TabIndex        =   4
  130.       Top             =   1680
  131.       Width           =   1215
  132.    End
  133.    Begin OraData EmpData 
  134.       AllowMoveLast   =   -1  'True
  135.       AutoBinding     =   -1  'True
  136.       Caption         =   "         Previous Employee -- Next Employee"
  137.       Connect         =   ""
  138.       DatabaseName    =   ""
  139.       Height          =   270
  140.       HiddenName      =   "EmpData"
  141.       Left            =   360
  142.       Options         =   2162688
  143.       ReadOnly        =   0   'False
  144.       RecordSource    =   ""
  145.       TabIndex        =   12
  146.       Top             =   4560
  147.       TrailingBlanks  =   0   'False
  148.       Width           =   5535
  149.    End
  150.    Begin Label Label11 
  151.       Alignment       =   1  'Right Justify
  152.       AutoSize        =   -1  'True
  153.       Caption         =   "Location:"
  154.       FontBold        =   -1  'True
  155.       FontItalic      =   0   'False
  156.       FontName        =   "MS Sans Serif"
  157.       FontSize        =   9.75
  158.       FontStrikethru  =   0   'False
  159.       FontUnderline   =   0   'False
  160.       Height          =   240
  161.       Left            =   1560
  162.       TabIndex        =   23
  163.       Top             =   840
  164.       Width           =   960
  165.    End
  166.    Begin Label Label8 
  167.       Alignment       =   1  'Right Justify
  168.       AutoSize        =   -1  'True
  169.       Caption         =   "Department Number:"
  170.       FontBold        =   -1  'True
  171.       FontItalic      =   0   'False
  172.       FontName        =   "MS Sans Serif"
  173.       FontSize        =   9.75
  174.       FontStrikethru  =   0   'False
  175.       FontUnderline   =   0   'False
  176.       Height          =   240
  177.       Left            =   450
  178.       TabIndex        =   22
  179.       Top             =   4200
  180.       Width           =   2145
  181.    End
  182.    Begin Line Line1 
  183.       BorderWidth     =   3
  184.       X1              =   120
  185.       X2              =   6360
  186.       Y1              =   1560
  187.       Y2              =   1560
  188.    End
  189.    Begin Label Label10 
  190.       Alignment       =   1  'Right Justify
  191.       AutoSize        =   -1  'True
  192.       Caption         =   "Department Name:"
  193.       FontBold        =   -1  'True
  194.       FontItalic      =   0   'False
  195.       FontName        =   "MS Sans Serif"
  196.       FontSize        =   9.75
  197.       FontStrikethru  =   0   'False
  198.       FontUnderline   =   0   'False
  199.       Height          =   240
  200.       Left            =   600
  201.       TabIndex        =   21
  202.       Top             =   480
  203.       Width           =   1950
  204.    End
  205.    Begin Label Label9 
  206.       Alignment       =   1  'Right Justify
  207.       AutoSize        =   -1  'True
  208.       Caption         =   "Department Number:"
  209.       FontBold        =   -1  'True
  210.       FontItalic      =   0   'False
  211.       FontName        =   "MS Sans Serif"
  212.       FontSize        =   9.75
  213.       FontStrikethru  =   0   'False
  214.       FontUnderline   =   0   'False
  215.       Height          =   240
  216.       Left            =   360
  217.       TabIndex        =   20
  218.       Top             =   120
  219.       Width           =   2145
  220.    End
  221.    Begin Label Label7 
  222.       Alignment       =   1  'Right Justify
  223.       AutoSize        =   -1  'True
  224.       Caption         =   "Commission:"
  225.       FontBold        =   -1  'True
  226.       FontItalic      =   0   'False
  227.       FontName        =   "MS Sans Serif"
  228.       FontSize        =   9.75
  229.       FontStrikethru  =   0   'False
  230.       FontUnderline   =   0   'False
  231.       Height          =   255
  232.       Left            =   1200
  233.       TabIndex        =   19
  234.       Top             =   3840
  235.       Width           =   1335
  236.    End
  237.    Begin Label Label6 
  238.       Alignment       =   1  'Right Justify
  239.       AutoSize        =   -1  'True
  240.       Caption         =   "Salary:"
  241.       FontBold        =   -1  'True
  242.       FontItalic      =   0   'False
  243.       FontName        =   "MS Sans Serif"
  244.       FontSize        =   9.75
  245.       FontStrikethru  =   0   'False
  246.       FontUnderline   =   0   'False
  247.       Height          =   255
  248.       Left            =   1680
  249.       TabIndex        =   18
  250.       Top             =   3480
  251.       Width           =   855
  252.    End
  253.    Begin Label Label5 
  254.       Alignment       =   1  'Right Justify
  255.       AutoSize        =   -1  'True
  256.       Caption         =   "Hire Date:"
  257.       FontBold        =   -1  'True
  258.       FontItalic      =   0   'False
  259.       FontName        =   "MS Sans Serif"
  260.       FontSize        =   9.75
  261.       FontStrikethru  =   0   'False
  262.       FontUnderline   =   0   'False
  263.       Height          =   255
  264.       Left            =   1440
  265.       TabIndex        =   17
  266.       Top             =   3120
  267.       Width           =   1095
  268.    End
  269.    Begin Label Label4 
  270.       Alignment       =   1  'Right Justify
  271.       AutoSize        =   -1  'True
  272.       Caption         =   "Manager:"
  273.       FontBold        =   -1  'True
  274.       FontItalic      =   0   'False
  275.       FontName        =   "MS Sans Serif"
  276.       FontSize        =   9.75
  277.       FontStrikethru  =   0   'False
  278.       FontUnderline   =   0   'False
  279.       Height          =   240
  280.       Left            =   1560
  281.       TabIndex        =   16
  282.       Top             =   2760
  283.       Width           =   990
  284.    End
  285.    Begin Label Label3 
  286.       Alignment       =   1  'Right Justify
  287.       AutoSize        =   -1  'True
  288.       Caption         =   "Job:"
  289.       FontBold        =   -1  'True
  290.       FontItalic      =   0   'False
  291.       FontName        =   "MS Sans Serif"
  292.       FontSize        =   9.75
  293.       FontStrikethru  =   0   'False
  294.       FontUnderline   =   0   'False
  295.       Height          =   255
  296.       Left            =   2040
  297.       TabIndex        =   15
  298.       Top             =   2400
  299.       Width           =   495
  300.    End
  301.    Begin Label Label2 
  302.       Alignment       =   1  'Right Justify
  303.       AutoSize        =   -1  'True
  304.       Caption         =   "Employee Name:"
  305.       FontBold        =   -1  'True
  306.       FontItalic      =   0   'False
  307.       FontName        =   "MS Sans Serif"
  308.       FontSize        =   9.75
  309.       FontStrikethru  =   0   'False
  310.       FontUnderline   =   0   'False
  311.       Height          =   255
  312.       Left            =   720
  313.       TabIndex        =   14
  314.       Top             =   2040
  315.       Width           =   1815
  316.    End
  317.    Begin Label Label1 
  318.       Alignment       =   1  'Right Justify
  319.       AutoSize        =   -1  'True
  320.       Caption         =   "Employee Number:"
  321.       FontBold        =   -1  'True
  322.       FontItalic      =   0   'False
  323.       FontName        =   "MS Sans Serif"
  324.       FontSize        =   9.75
  325.       FontStrikethru  =   0   'False
  326.       FontUnderline   =   0   'False
  327.       Height          =   255
  328.       Left            =   480
  329.       TabIndex        =   13
  330.       Top             =   1680
  331.       Width           =   2055
  332.    End
  333.    Begin Menu mExit 
  334.       Caption         =   "E&xit!"
  335.    End
  336. End
  337. Option Explicit
  338.  
  339. Sub DeptData_Reposition ()
  340.  
  341.  If DeptData.Recordset.EOF <> True Then
  342.   OraDatabase.Parameters("deptno").value = DeptData.Recordset.fields("deptno").value
  343.   EmpData.Recordset.DbRefresh
  344.  End If
  345.  
  346. End Sub
  347.  
  348. Sub Form_Load ()
  349.  
  350.  'Refresh the data control without setting the
  351.  'Recordsource. This will create the underlying Session
  352.  'and Database.
  353.  EmpData.Connect = Connect$
  354.  EmpData.DatabaseName = DatabaseName$
  355.  EmpData.Refresh
  356.  
  357.  'Add a parameter for the Emp query.
  358.  Set OraDatabase = EmpData.Database
  359.  OraDatabase.Parameters.Add "deptno", 0, 1
  360.  
  361.  EmpData.RecordSource = EmpQuery$
  362.  EmpData.Refresh
  363.  
  364.  'Set the recordsource of the emp data control and refresh.
  365.  DeptData.Connect = Connect$
  366.  DeptData.DatabaseName = DatabaseName$
  367.  DeptData.RecordSource = DeptQuery$
  368.  DeptData.Refresh
  369.  
  370. End Sub
  371.  
  372. Sub mExit_Click ()
  373.  End
  374. End Sub
  375.  
  376.