Access2Base - Set Parent property in all classes
To get faster access to parents from controls Top classes (form, dialog and commandbar) should return Parent = Nothing
This commit is contained in:
@@ -17,6 +17,7 @@ REM ----------------------------------------------------------------------------
|
|||||||
|
|
||||||
Private _Type As String ' Must be COMMANDBAR
|
Private _Type As String ' Must be COMMANDBAR
|
||||||
Private _This As Object ' Workaround for absence of This builtin function
|
Private _This As Object ' Workaround for absence of This builtin function
|
||||||
|
Private _Parent As Object
|
||||||
Private _Name As String
|
Private _Name As String
|
||||||
Private _ResourceURL As String
|
Private _ResourceURL As String
|
||||||
Private _Window As Object ' com.sun.star.frame.XFrame
|
Private _Window As Object ' com.sun.star.frame.XFrame
|
||||||
@@ -31,6 +32,7 @@ REM ----------------------------------------------------------------------------
|
|||||||
Private Sub Class_Initialize()
|
Private Sub Class_Initialize()
|
||||||
_Type = OBJCOMMANDBAR
|
_Type = OBJCOMMANDBAR
|
||||||
Set _This = Nothing
|
Set _This = Nothing
|
||||||
|
Set _Parent = Nothing
|
||||||
_Name = ""
|
_Name = ""
|
||||||
_ResourceURL = ""
|
_ResourceURL = ""
|
||||||
Set _Window = Nothing
|
Set _Window = Nothing
|
||||||
@@ -74,6 +76,11 @@ Property Get ObjectType() As String
|
|||||||
ObjectType = _PropertyGet("ObjectType")
|
ObjectType = _PropertyGet("ObjectType")
|
||||||
End Property ' ObjectType (get)
|
End Property ' ObjectType (get)
|
||||||
|
|
||||||
|
REM -----------------------------------------------------------------------------------------------------------------------
|
||||||
|
Public Function Parent() As Object
|
||||||
|
Parent = _Parent
|
||||||
|
End Function ' Parent (get) V6.4.0
|
||||||
|
|
||||||
REM -----------------------------------------------------------------------------------------------------------------------
|
REM -----------------------------------------------------------------------------------------------------------------------
|
||||||
Public Function Properties(ByVal Optional pvIndex As Variant) As Variant
|
Public Function Properties(ByVal Optional pvIndex As Variant) As Variant
|
||||||
' Return
|
' Return
|
||||||
@@ -151,7 +158,8 @@ Dim oObject As Object
|
|||||||
If pvIndex = iItemsCount - 1 Then
|
If pvIndex = iItemsCount - 1 Then
|
||||||
Set oObject = New CommandBarControl
|
Set oObject = New CommandBarControl
|
||||||
With oObject
|
With oObject
|
||||||
._This = oObject
|
Set ._This = oObject
|
||||||
|
Set ._Parent = _This
|
||||||
._ParentCommandBarName = _Name
|
._ParentCommandBarName = _Name
|
||||||
._ParentCommandBar = oToolbar
|
._ParentCommandBar = oToolbar
|
||||||
._ParentBuiltin = ( _BarBuiltin = 1 )
|
._ParentBuiltin = ( _BarBuiltin = 1 )
|
||||||
|
@@ -17,6 +17,7 @@ REM ----------------------------------------------------------------------------
|
|||||||
|
|
||||||
Private _Type As String ' Must be COMMANDBARCONTROL
|
Private _Type As String ' Must be COMMANDBARCONTROL
|
||||||
Private _This As Object ' Workaround for absence of This builtin function
|
Private _This As Object ' Workaround for absence of This builtin function
|
||||||
|
Private _Parent As Object
|
||||||
Private _InternalIndex As Integer ' Index in toolbar including separators
|
Private _InternalIndex As Integer ' Index in toolbar including separators
|
||||||
Private _Index As Integer ' Index in collection, starting at 1 !!
|
Private _Index As Integer ' Index in collection, starting at 1 !!
|
||||||
Private _ControlType As Integer ' 1 of the msoControl* constants
|
Private _ControlType As Integer ' 1 of the msoControl* constants
|
||||||
@@ -32,6 +33,7 @@ REM ----------------------------------------------------------------------------
|
|||||||
Private Sub Class_Initialize()
|
Private Sub Class_Initialize()
|
||||||
_Type = OBJCOMMANDBARCONTROL
|
_Type = OBJCOMMANDBARCONTROL
|
||||||
Set _This = Nothing
|
Set _This = Nothing
|
||||||
|
Set _Parent = Nothing
|
||||||
_Index = -1
|
_Index = -1
|
||||||
_ParentCommandBarName = ""
|
_ParentCommandBarName = ""
|
||||||
Set _ParentCommandBar = Nothing
|
Set _ParentCommandBar = Nothing
|
||||||
@@ -238,7 +240,7 @@ Const cstUnoPrefix = ".uno:"
|
|||||||
Case UCase("OnAction")
|
Case UCase("OnAction")
|
||||||
_PropertyGet = _GetPropertyValue(_Element, "CommandURL", "")
|
_PropertyGet = _GetPropertyValue(_Element, "CommandURL", "")
|
||||||
Case UCase("Parent")
|
Case UCase("Parent")
|
||||||
Set _PropertyGet = Application.CommandBars(_ParentCommandBarName)
|
Set _PropertyGet = _Parent
|
||||||
Case UCase("TooltipText")
|
Case UCase("TooltipText")
|
||||||
sValue = _GetPropertyValue(_Element, "Tooltip", "")
|
sValue = _GetPropertyValue(_Element, "Tooltip", "")
|
||||||
If sValue <> "" Then _PropertyGet = sValue Else _PropertyGet = _GetPropertyValue(_Element, "Label", "")
|
If sValue <> "" Then _PropertyGet = sValue Else _PropertyGet = _GetPropertyValue(_Element, "Label", "")
|
||||||
|
@@ -17,6 +17,7 @@ REM ----------------------------------------------------------------------------
|
|||||||
|
|
||||||
Private _Type As String ' Must be CONTROL
|
Private _Type As String ' Must be CONTROL
|
||||||
Private _This As Object ' Workaround for absence of This builtin function
|
Private _This As Object ' Workaround for absence of This builtin function
|
||||||
|
Private _Parent As Object
|
||||||
Private _ImplementationName As String
|
Private _ImplementationName As String
|
||||||
Private _ClassId As Integer
|
Private _ClassId As Integer
|
||||||
Private _ParentType As String ' One of CTLPARENTISxxxx constants
|
Private _ParentType As String ' One of CTLPARENTISxxxx constants
|
||||||
@@ -40,6 +41,7 @@ REM ----------------------------------------------------------------------------
|
|||||||
Private Sub Class_Initialize()
|
Private Sub Class_Initialize()
|
||||||
_Type = OBJCONTROL
|
_Type = OBJCONTROL
|
||||||
Set _This = Nothing
|
Set _This = Nothing
|
||||||
|
Set _Parent = Nothing
|
||||||
_ClassId = -1
|
_ClassId = -1
|
||||||
_ParentType = ""
|
_ParentType = ""
|
||||||
_Shortcut = ""
|
_Shortcut = ""
|
||||||
@@ -781,6 +783,7 @@ Dim j As Integer, oView As Object
|
|||||||
' Determine exact name
|
' Determine exact name
|
||||||
Set ocControl = New Control
|
Set ocControl = New Control
|
||||||
Set ocControl._This = ocControl
|
Set ocControl._This = ocControl
|
||||||
|
Set ocControl._Parent = _This
|
||||||
ocControl._ParentType = CTLPARENTISGRID
|
ocControl._ParentType = CTLPARENTISGRID
|
||||||
sParentShortcut = _Shortcut
|
sParentShortcut = _Shortcut
|
||||||
sControls() = ControlModel.getElementNames()
|
sControls() = ControlModel.getElementNames()
|
||||||
@@ -1649,7 +1652,7 @@ Dim oControlEvents As Object, sEventName As String
|
|||||||
Case UCase("Page")
|
Case UCase("Page")
|
||||||
If Utils._hasUNOProperty(ControlModel, "Step") Then _PropertyGet = ControlModel.Step
|
If Utils._hasUNOProperty(ControlModel, "Step") Then _PropertyGet = ControlModel.Step
|
||||||
Case UCase("Parent")
|
Case UCase("Parent")
|
||||||
Set _PropertyGet = PropertiesGet._ParentObject(_Shortcut)
|
Set _PropertyGet = _Parent
|
||||||
Case UCase("Picture")
|
Case UCase("Picture")
|
||||||
_PropertyGet = ConvertToUrl(ControlModel.ImageURL)
|
_PropertyGet = ConvertToUrl(ControlModel.ImageURL)
|
||||||
Case UCase("Required")
|
Case UCase("Required")
|
||||||
|
@@ -17,6 +17,7 @@ REM ----------------------------------------------------------------------------
|
|||||||
|
|
||||||
Private _Type As String ' Must be TABLEDEF or QUERYDEF
|
Private _Type As String ' Must be TABLEDEF or QUERYDEF
|
||||||
Private _This As Object ' Workaround for absence of This builtin function
|
Private _This As Object ' Workaround for absence of This builtin function
|
||||||
|
Private _Parent As Object
|
||||||
Private _Name As String ' For tables: [[Catalog.]Schema.]Table
|
Private _Name As String ' For tables: [[Catalog.]Schema.]Table
|
||||||
Private _ParentDatabase As Object
|
Private _ParentDatabase As Object
|
||||||
Private _ReadOnly As Boolean
|
Private _ReadOnly As Boolean
|
||||||
@@ -35,6 +36,7 @@ REM ----------------------------------------------------------------------------
|
|||||||
Private Sub Class_Initialize()
|
Private Sub Class_Initialize()
|
||||||
_Type = ""
|
_Type = ""
|
||||||
Set _This = Nothing
|
Set _This = Nothing
|
||||||
|
Set _Parent = Nothing
|
||||||
_Name = ""
|
_Name = ""
|
||||||
Set _ParentDatabase = Nothing
|
Set _ParentDatabase = Nothing
|
||||||
_ReadOnly = False
|
_ReadOnly = False
|
||||||
|
@@ -17,6 +17,7 @@ REM ----------------------------------------------------------------------------
|
|||||||
|
|
||||||
Private _Type As String ' Must be DATABASE
|
Private _Type As String ' Must be DATABASE
|
||||||
Private _This As Object ' Workaround for absence of This builtin function
|
Private _This As Object ' Workaround for absence of This builtin function
|
||||||
|
Private _Parent As Object
|
||||||
Private _DbConnect As Integer ' DBCONNECTxxx constants
|
Private _DbConnect As Integer ' DBCONNECTxxx constants
|
||||||
Private Title As String
|
Private Title As String
|
||||||
Private Document As Object ' com.sun.star.comp.dba.ODatabaseDocument or SwXTextDocument or ScModelObj
|
Private Document As Object ' com.sun.star.comp.dba.ODatabaseDocument or SwXTextDocument or ScModelObj
|
||||||
@@ -43,6 +44,7 @@ REM ----------------------------------------------------------------------------
|
|||||||
Private Sub Class_Initialize()
|
Private Sub Class_Initialize()
|
||||||
_Type = OBJDATABASE
|
_Type = OBJDATABASE
|
||||||
Set _This = Nothing
|
Set _This = Nothing
|
||||||
|
Set _Parent = Nothing
|
||||||
_DbConnect = 0
|
_DbConnect = 0
|
||||||
Title = ""
|
Title = ""
|
||||||
Set Document = Nothing
|
Set Document = Nothing
|
||||||
|
@@ -17,6 +17,7 @@ REM ----------------------------------------------------------------------------
|
|||||||
|
|
||||||
Private _Type As String ' Must be DIALOG
|
Private _Type As String ' Must be DIALOG
|
||||||
Private _This As Object ' Workaround for absence of This builtin function
|
Private _This As Object ' Workaround for absence of This builtin function
|
||||||
|
Private _Parent As Object
|
||||||
Private _Name As String
|
Private _Name As String
|
||||||
Private _Shortcut As String
|
Private _Shortcut As String
|
||||||
Private _Dialog As Object ' com.sun.star.io.XInputStreamProvider
|
Private _Dialog As Object ' com.sun.star.io.XInputStreamProvider
|
||||||
@@ -30,6 +31,7 @@ REM ----------------------------------------------------------------------------
|
|||||||
Private Sub Class_Initialize()
|
Private Sub Class_Initialize()
|
||||||
_Type = OBJDIALOG
|
_Type = OBJDIALOG
|
||||||
Set _This = Nothing
|
Set _This = Nothing
|
||||||
|
Set _Parent = Nothing
|
||||||
_Name = ""
|
_Name = ""
|
||||||
Set _Dialog = Nothing
|
Set _Dialog = Nothing
|
||||||
_Storage = ""
|
_Storage = ""
|
||||||
@@ -291,6 +293,11 @@ Property Let Page(ByVal pvValue As Variant)
|
|||||||
Call _PropertySet("Page", pvValue)
|
Call _PropertySet("Page", pvValue)
|
||||||
End Property ' Page (set)
|
End Property ' Page (set)
|
||||||
|
|
||||||
|
REM -----------------------------------------------------------------------------------------------------------------------
|
||||||
|
Public Function Parent() As Object
|
||||||
|
Parent = _Parent
|
||||||
|
End Function ' Parent (get) V6.4.0
|
||||||
|
|
||||||
REM -----------------------------------------------------------------------------------------------------------------------
|
REM -----------------------------------------------------------------------------------------------------------------------
|
||||||
Public Function Properties(ByVal Optional pvIndex As Variant) As Variant
|
Public Function Properties(ByVal Optional pvIndex As Variant) As Variant
|
||||||
' Return
|
' Return
|
||||||
@@ -353,6 +360,7 @@ Dim j As Integer
|
|||||||
If Not IsLoaded Then Goto Trace_Error_NotOpen
|
If Not IsLoaded Then Goto Trace_Error_NotOpen
|
||||||
Set ocControl = New Control
|
Set ocControl = New Control
|
||||||
Set ocControl._This = ocControl
|
Set ocControl._This = ocControl
|
||||||
|
Set ocControl._Parent = _This
|
||||||
ocControl._ParentType = CTLPARENTISDIALOG
|
ocControl._ParentType = CTLPARENTISDIALOG
|
||||||
sParentShortcut = _Shortcut
|
sParentShortcut = _Shortcut
|
||||||
sControls() = UnoDialog.Model.getElementNames()
|
sControls() = UnoDialog.Model.getElementNames()
|
||||||
|
@@ -17,6 +17,7 @@ REM ----------------------------------------------------------------------------
|
|||||||
|
|
||||||
Private _Type As String ' Must be FIELD
|
Private _Type As String ' Must be FIELD
|
||||||
Private _This As Object ' Workaround for absence of This builtin function
|
Private _This As Object ' Workaround for absence of This builtin function
|
||||||
|
Private _Parent As Object
|
||||||
Private _Name As String
|
Private _Name As String
|
||||||
Private _Precision As Long
|
Private _Precision As Long
|
||||||
Private _ParentName As String
|
Private _ParentName As String
|
||||||
@@ -35,6 +36,7 @@ REM ----------------------------------------------------------------------------
|
|||||||
Private Sub Class_Initialize()
|
Private Sub Class_Initialize()
|
||||||
_Type = OBJFIELD
|
_Type = OBJFIELD
|
||||||
Set _This = Nothing
|
Set _This = Nothing
|
||||||
|
Set _Parent = Nothing
|
||||||
_Name = ""
|
_Name = ""
|
||||||
_ParentName = ""
|
_ParentName = ""
|
||||||
_ParentType = ""
|
_ParentType = ""
|
||||||
|
@@ -17,6 +17,7 @@ REM ----------------------------------------------------------------------------
|
|||||||
|
|
||||||
Private _Type As String ' Must be FORM
|
Private _Type As String ' Must be FORM
|
||||||
Private _This As Object ' Workaround for absence of This builtin function
|
Private _This As Object ' Workaround for absence of This builtin function
|
||||||
|
Private _Parent As Object
|
||||||
Private _Shortcut As String
|
Private _Shortcut As String
|
||||||
Private _Name As String
|
Private _Name As String
|
||||||
Private _DocEntry As Integer ' Doc- and DbContainer entries in Root structure
|
Private _DocEntry As Integer ' Doc- and DbContainer entries in Root structure
|
||||||
@@ -37,6 +38,7 @@ REM ----------------------------------------------------------------------------
|
|||||||
Private Sub Class_Initialize()
|
Private Sub Class_Initialize()
|
||||||
_Type = OBJFORM
|
_Type = OBJFORM
|
||||||
Set _This = Nothing
|
Set _This = Nothing
|
||||||
|
Set _Parent = Nothing
|
||||||
_Shortcut = ""
|
_Shortcut = ""
|
||||||
_Name = ""
|
_Name = ""
|
||||||
_DocEntry = -1
|
_DocEntry = -1
|
||||||
@@ -397,6 +399,11 @@ Error_Function:
|
|||||||
GoTo Exit_Function
|
GoTo Exit_Function
|
||||||
End Function ' OptionGroup V1.1.0
|
End Function ' OptionGroup V1.1.0
|
||||||
|
|
||||||
|
REM -----------------------------------------------------------------------------------------------------------------------
|
||||||
|
Public Function Parent() As Object
|
||||||
|
Parent = _Parent
|
||||||
|
End Function ' Parent (get) V6.4.0
|
||||||
|
|
||||||
REM -----------------------------------------------------------------------------------------------------------------------
|
REM -----------------------------------------------------------------------------------------------------------------------
|
||||||
Public Function Properties(ByVal Optional pvIndex As Variant) As Variant
|
Public Function Properties(ByVal Optional pvIndex As Variant) As Variant
|
||||||
' Return
|
' Return
|
||||||
@@ -556,7 +563,8 @@ Dim oDatabaseForm As Object, iCtlCount As Integer
|
|||||||
'Initialize a new Control object
|
'Initialize a new Control object
|
||||||
Set ocControl = New Control
|
Set ocControl = New Control
|
||||||
With ocControl
|
With ocControl
|
||||||
._This = ocControl
|
Set ._This = ocControl
|
||||||
|
Set ._Parent = _This
|
||||||
._ParentType = CTLPARENTISFORM
|
._ParentType = CTLPARENTISFORM
|
||||||
._Name = sName
|
._Name = sName
|
||||||
._Shortcut = _Shortcut & "!" & Utils._Surround(sName)
|
._Shortcut = _Shortcut & "!" & Utils._Surround(sName)
|
||||||
|
@@ -17,6 +17,7 @@ REM ----------------------------------------------------------------------------
|
|||||||
|
|
||||||
Private _Type As String ' Must be MODULE
|
Private _Type As String ' Must be MODULE
|
||||||
Private _This As Object ' Workaround for absence of This builtin function
|
Private _This As Object ' Workaround for absence of This builtin function
|
||||||
|
Private _Parent As Object
|
||||||
Private _Name As String
|
Private _Name As String
|
||||||
Private _Library As Object ' com.sun.star.container.XNameAccess
|
Private _Library As Object ' com.sun.star.container.XNameAccess
|
||||||
Private _LibraryName As String
|
Private _LibraryName As String
|
||||||
@@ -36,6 +37,7 @@ REM ----------------------------------------------------------------------------
|
|||||||
Private Sub Class_Initialize()
|
Private Sub Class_Initialize()
|
||||||
_Type = OBJMODULE
|
_Type = OBJMODULE
|
||||||
Set _This = Nothing
|
Set _This = Nothing
|
||||||
|
Set _Parent = Nothing
|
||||||
_Name = ""
|
_Name = ""
|
||||||
Set _Library = Nothing
|
Set _Library = Nothing
|
||||||
_LibraryName = ""
|
_LibraryName = ""
|
||||||
|
@@ -17,6 +17,7 @@ REM ----------------------------------------------------------------------------
|
|||||||
|
|
||||||
Private _Type As String ' Must be FORM
|
Private _Type As String ' Must be FORM
|
||||||
Private _This As Object ' Workaround for absence of This builtin function
|
Private _This As Object ' Workaround for absence of This builtin function
|
||||||
|
Private _Parent As Object
|
||||||
Private _Name As String
|
Private _Name As String
|
||||||
Private _ParentType As String
|
Private _ParentType As String
|
||||||
Private _ParentComponent As Object
|
Private _ParentComponent As Object
|
||||||
@@ -33,6 +34,7 @@ REM ----------------------------------------------------------------------------
|
|||||||
Private Sub Class_Initialize()
|
Private Sub Class_Initialize()
|
||||||
_Type = OBJOPTIONGROUP
|
_Type = OBJOPTIONGROUP
|
||||||
Set _This = Nothing
|
Set _This = Nothing
|
||||||
|
Set _Parent = Nothing
|
||||||
_Name = ""
|
_Name = ""
|
||||||
_ParentType = ""
|
_ParentType = ""
|
||||||
_ParentComponent = Nothing
|
_ParentComponent = Nothing
|
||||||
@@ -137,6 +139,7 @@ Dim oCounter As Object
|
|||||||
' Determine exact name
|
' Determine exact name
|
||||||
Set ocControl = New Control
|
Set ocControl = New Control
|
||||||
Set ocControl._This = ocControl
|
Set ocControl._This = ocControl
|
||||||
|
Set ocControl._Parent = _This
|
||||||
ocControl._ParentType = CTLPARENTISGROUP
|
ocControl._ParentType = CTLPARENTISGROUP
|
||||||
|
|
||||||
ocControl._Shortcut = ""
|
ocControl._Shortcut = ""
|
||||||
|
@@ -17,6 +17,7 @@ REM ----------------------------------------------------------------------------
|
|||||||
|
|
||||||
Private _Type As String ' Must be PROPERTY
|
Private _Type As String ' Must be PROPERTY
|
||||||
Private _This As Object ' Workaround for absence of This builtin function
|
Private _This As Object ' Workaround for absence of This builtin function
|
||||||
|
Private _Parent As Object
|
||||||
Private _Name As String
|
Private _Name As String
|
||||||
Private _Value As Variant
|
Private _Value As Variant
|
||||||
Private _ParentDatabase As Object
|
Private _ParentDatabase As Object
|
||||||
@@ -27,6 +28,7 @@ REM ----------------------------------------------------------------------------
|
|||||||
Private Sub Class_Initialize()
|
Private Sub Class_Initialize()
|
||||||
_Type = OBJPROPERTY
|
_Type = OBJPROPERTY
|
||||||
Set _This = Nothing
|
Set _This = Nothing
|
||||||
|
Set _Parent = Nothing
|
||||||
_Name = ""
|
_Name = ""
|
||||||
_Value = Null
|
_Value = Null
|
||||||
End Sub ' Constructor
|
End Sub ' Constructor
|
||||||
|
@@ -17,6 +17,7 @@ REM ----------------------------------------------------------------------------
|
|||||||
|
|
||||||
Private _Type As String ' Must be RECORDSET
|
Private _Type As String ' Must be RECORDSET
|
||||||
Private _This As Object ' Workaround for absence of This builtin function
|
Private _This As Object ' Workaround for absence of This builtin function
|
||||||
|
Private _Parent As Object
|
||||||
Private _Name As String ' Unique, generated
|
Private _Name As String ' Unique, generated
|
||||||
Private _Fields() As Variant
|
Private _Fields() As Variant
|
||||||
Private _ParentName As String
|
Private _ParentName As String
|
||||||
@@ -52,6 +53,7 @@ REM ----------------------------------------------------------------------------
|
|||||||
Private Sub Class_Initialize()
|
Private Sub Class_Initialize()
|
||||||
_Type = OBJRECORDSET
|
_Type = OBJRECORDSET
|
||||||
Set _This = Nothing
|
Set _This = Nothing
|
||||||
|
Set _Parent = Nothing
|
||||||
_Name = ""
|
_Name = ""
|
||||||
_Fields = Array()
|
_Fields = Array()
|
||||||
_ParentName = ""
|
_ParentName = ""
|
||||||
|
@@ -17,6 +17,7 @@ REM ----------------------------------------------------------------------------
|
|||||||
|
|
||||||
Private _Type As String ' Must be SUBFORM
|
Private _Type As String ' Must be SUBFORM
|
||||||
Private _This As Object ' Workaround for absence of This builtin function
|
Private _This As Object ' Workaround for absence of This builtin function
|
||||||
|
Private _Parent As Object
|
||||||
Private _Shortcut As String
|
Private _Shortcut As String
|
||||||
Private _Name As String
|
Private _Name As String
|
||||||
Private _MainForm As String
|
Private _MainForm As String
|
||||||
@@ -32,6 +33,7 @@ REM ----------------------------------------------------------------------------
|
|||||||
Private Sub Class_Initialize()
|
Private Sub Class_Initialize()
|
||||||
_Type = OBJSUBFORM
|
_Type = OBJSUBFORM
|
||||||
Set _This = Nothing
|
Set _This = Nothing
|
||||||
|
Set _Parent = Nothing
|
||||||
_Shortcut = ""
|
_Shortcut = ""
|
||||||
_Name = ""
|
_Name = ""
|
||||||
_MainForm = ""
|
_MainForm = ""
|
||||||
@@ -317,7 +319,7 @@ Public Function Parent() As Object
|
|||||||
Utils._SetCalledSub("SubForm.getParent")
|
Utils._SetCalledSub("SubForm.getParent")
|
||||||
On Error Goto Error_Function
|
On Error Goto Error_Function
|
||||||
|
|
||||||
Set Parent = PropertiesGet._ParentObject(_Shortcut)
|
Set Parent = _Parent
|
||||||
|
|
||||||
Exit_Function:
|
Exit_Function:
|
||||||
Utils._ResetCalledSub("SubForm.getParent")
|
Utils._ResetCalledSub("SubForm.getParent")
|
||||||
@@ -395,6 +397,7 @@ Dim j As Integer
|
|||||||
' Determine exact name
|
' Determine exact name
|
||||||
Set ocControl = New Control
|
Set ocControl = New Control
|
||||||
Set ocControl._This = ocControl
|
Set ocControl._This = ocControl
|
||||||
|
Set ocControl._Parent = _This
|
||||||
ocControl._ParentType = CTLPARENTISSUBFORM
|
ocControl._ParentType = CTLPARENTISSUBFORM
|
||||||
sParentShortcut = _Shortcut
|
sParentShortcut = _Shortcut
|
||||||
sControls() = DatabaseForm.getElementNames()
|
sControls() = DatabaseForm.getElementNames()
|
||||||
|
@@ -17,6 +17,7 @@ REM ----------------------------------------------------------------------------
|
|||||||
|
|
||||||
Private _Type As String ' Must be TEMPVAR
|
Private _Type As String ' Must be TEMPVAR
|
||||||
Private _This As Object ' Workaround for absence of This builtin function
|
Private _This As Object ' Workaround for absence of This builtin function
|
||||||
|
Private _Parent As Object
|
||||||
Private _Name As String
|
Private _Name As String
|
||||||
Private _Value As Variant
|
Private _Value As Variant
|
||||||
|
|
||||||
@@ -26,6 +27,7 @@ REM ----------------------------------------------------------------------------
|
|||||||
Private Sub Class_Initialize()
|
Private Sub Class_Initialize()
|
||||||
_Type = OBJTEMPVAR
|
_Type = OBJTEMPVAR
|
||||||
Set _This = Nothing
|
Set _This = Nothing
|
||||||
|
Set _Parent = Nothing
|
||||||
_Name = ""
|
_Name = ""
|
||||||
_Value = Null
|
_Value = Null
|
||||||
End Sub ' Constructor
|
End Sub ' Constructor
|
||||||
|
Reference in New Issue
Block a user