home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1996 February
/
PCWK0296.iso
/
po7_win
/
object10
/
dempodc.frm
< prev
next >
Wrap
Text File
|
1994-11-14
|
12KB
|
376 lines
VERSION 2.00
Begin Form frmDeptEmp
BorderStyle = 3 'Fixed Double
Caption = "Dept-Emp Master Detail Form"
ClientHeight = 4905
ClientLeft = 2355
ClientTop = 2235
ClientWidth = 6495
Height = 5595
Left = 2295
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 4905
ScaleWidth = 6495
Top = 1605
Width = 6615
Begin TextBox txtLoc
DataField = "loc"
DataSource = "DeptData"
Height = 285
Left = 2640
TabIndex = 2
Top = 840
Width = 2775
End
Begin TextBox txtEmpDeptno
DataField = "deptno"
DataSource = "EmpData"
Height = 285
Left = 2640
TabIndex = 11
Top = 4200
Width = 1215
End
Begin TextBox txtDname
DataField = "dname"
DataSource = "DeptData"
Height = 285
Left = 2640
TabIndex = 1
Top = 480
Width = 2775
End
Begin TextBox txtDeptno
DataField = "deptno"
DataSource = "DeptData"
Height = 285
Left = 2640
TabIndex = 0
Top = 120
Width = 1215
End
Begin OraData DeptData
AllowMoveLast = -1 'True
AutoBinding = -1 'True
Caption = " Previous Department -- Next Department"
Connect = ""
DatabaseName = ""
Height = 270
HiddenName = "DeptData"
Left = 360
Options = 2162688
ReadOnly = 0 'False
RecordSource = ""
TabIndex = 3
Top = 1200
TrailingBlanks = 0 'False
Width = 5535
End
Begin TextBox txtComm
DataField = "comm"
DataSource = "EmpData"
Height = 285
Left = 2640
TabIndex = 10
Top = 3840
Width = 1215
End
Begin TextBox txtSal
DataField = "sal"
DataSource = "EmpData"
Height = 285
Left = 2640
TabIndex = 9
Top = 3480
Width = 1215
End
Begin TextBox txtHireDate
DataField = "hiredate"
DataSource = "EmpData"
Height = 285
Left = 2640
TabIndex = 8
Top = 3120
Width = 1215
End
Begin TextBox txtMgr
DataField = "mgr"
DataSource = "EmpData"
Height = 285
Left = 2640
TabIndex = 7
Top = 2760
Width = 1215
End
Begin TextBox txtJob
DataField = "job"
DataSource = "EmpData"
Height = 285
Left = 2640
TabIndex = 6
Top = 2400
Width = 2775
End
Begin TextBox txtEname
DataField = "ename"
DataSource = "EmpData"
Height = 285
Left = 2640
TabIndex = 5
Top = 2040
Width = 2775
End
Begin TextBox txtEmpno
DataField = "empno"
DataSource = "EmpData"
Height = 285
Left = 2640
TabIndex = 4
Top = 1680
Width = 1215
End
Begin OraData EmpData
AllowMoveLast = -1 'True
AutoBinding = -1 'True
Caption = " Previous Employee -- Next Employee"
Connect = ""
DatabaseName = ""
Height = 270
HiddenName = "EmpData"
Left = 360
Options = 2162688
ReadOnly = 0 'False
RecordSource = ""
TabIndex = 12
Top = 4560
TrailingBlanks = 0 'False
Width = 5535
End
Begin Label Label11
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "Location:"
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 240
Left = 1560
TabIndex = 23
Top = 840
Width = 960
End
Begin Label Label8
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "Department Number:"
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 240
Left = 450
TabIndex = 22
Top = 4200
Width = 2145
End
Begin Line Line1
BorderWidth = 3
X1 = 120
X2 = 6360
Y1 = 1560
Y2 = 1560
End
Begin Label Label10
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "Department Name:"
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 240
Left = 600
TabIndex = 21
Top = 480
Width = 1950
End
Begin Label Label9
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "Department Number:"
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 240
Left = 360
TabIndex = 20
Top = 120
Width = 2145
End
Begin Label Label7
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "Commission:"
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 255
Left = 1200
TabIndex = 19
Top = 3840
Width = 1335
End
Begin Label Label6
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "Salary:"
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 255
Left = 1680
TabIndex = 18
Top = 3480
Width = 855
End
Begin Label Label5
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "Hire Date:"
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 255
Left = 1440
TabIndex = 17
Top = 3120
Width = 1095
End
Begin Label Label4
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "Manager:"
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 240
Left = 1560
TabIndex = 16
Top = 2760
Width = 990
End
Begin Label Label3
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "Job:"
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 255
Left = 2040
TabIndex = 15
Top = 2400
Width = 495
End
Begin Label Label2
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "Employee Name:"
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 255
Left = 720
TabIndex = 14
Top = 2040
Width = 1815
End
Begin Label Label1
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "Employee Number:"
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 255
Left = 480
TabIndex = 13
Top = 1680
Width = 2055
End
Begin Menu mExit
Caption = "E&xit!"
End
End
Option Explicit
Sub DeptData_Reposition ()
If DeptData.Recordset.EOF <> True Then
OraDatabase.Parameters("deptno").value = DeptData.Recordset.fields("deptno").value
EmpData.Recordset.DbRefresh
End If
End Sub
Sub Form_Load ()
'Refresh the data control without setting the
'Recordsource. This will create the underlying Session
'and Database.
EmpData.Connect = Connect$
EmpData.DatabaseName = DatabaseName$
EmpData.Refresh
'Add a parameter for the Emp query.
Set OraDatabase = EmpData.Database
OraDatabase.Parameters.Add "deptno", 0, 1
EmpData.RecordSource = EmpQuery$
EmpData.Refresh
'Set the recordsource of the emp data control and refresh.
DeptData.Connect = Connect$
DeptData.DatabaseName = DatabaseName$
DeptData.RecordSource = DeptQuery$
DeptData.Refresh
End Sub
Sub mExit_Click ()
End
End Sub