summaryrefslogtreecommitdiff
path: root/wizards/source
diff options
context:
space:
mode:
authorJean-Pierre Ledure <jp@ledure.be>2019-06-29 11:16:56 +0200
committerJean-Pierre Ledure <jp@ledure.be>2019-06-29 11:16:56 +0200
commitb0e0059ab9f2f5cbd59915ba3be8681b9e033de1 (patch)
treeae8b8771b737b1ad53ea01422c303314bfd02f6a /wizards/source
parent00f4722032cd3abb02180d2df6b9cb580736cb7c (diff)
Access2Base - Consolidate classes processing
Introduce _This property in all classes and _Parent property where relevant Accelerate processing of Item method in Collections Enhance introspection
Diffstat (limited to 'wizards/source')
-rw-r--r--wizards/source/access2base/Application.xba13
-rw-r--r--wizards/source/access2base/Collect.xba83
-rw-r--r--wizards/source/access2base/CommandBar.xba7
-rw-r--r--wizards/source/access2base/CommandBarControl.xba4
-rw-r--r--wizards/source/access2base/Control.xba7
-rw-r--r--wizards/source/access2base/DataDef.xba10
-rw-r--r--wizards/source/access2base/Database.xba16
-rw-r--r--wizards/source/access2base/Dialog.xba5
-rw-r--r--wizards/source/access2base/Event.xba4
-rw-r--r--wizards/source/access2base/Field.xba6
-rw-r--r--wizards/source/access2base/Form.xba7
-rw-r--r--wizards/source/access2base/Module.xba4
-rw-r--r--wizards/source/access2base/OptionGroup.xba7
-rw-r--r--wizards/source/access2base/PropertiesGet.xba5
-rw-r--r--wizards/source/access2base/Property.xba4
-rw-r--r--wizards/source/access2base/Recordset.xba8
-rw-r--r--wizards/source/access2base/Root_.xba12
-rw-r--r--wizards/source/access2base/SubForm.xba7
-rw-r--r--wizards/source/access2base/TempVar.xba14
-rw-r--r--wizards/source/access2base/acConstants.xba19
20 files changed, 84 insertions, 158 deletions
diff --git a/wizards/source/access2base/Application.xba b/wizards/source/access2base/Application.xba
index 87477163c936..b59ff96b2e30 100644
--- a/wizards/source/access2base/Application.xba
+++ b/wizards/source/access2base/Application.xba
@@ -239,8 +239,6 @@ Const cstSepar = &quot;!&quot;
Set vAllDialogs = New Collect
Set vAllDialogs._This = vAllDialogs
vAllDialogs._CollType = COLLALLDIALOGS
- vAllDialogs._ParentType = OBJAPPLICATION
- vAllDialogs._ParentName = &quot;&quot;
vAllDialogs._Count = 0
Goto Exit_Function
End If
@@ -290,8 +288,6 @@ Const cstSepar = &quot;!&quot;
Set vAllDialogs = New Collect
Set vAllDialogs._This = vAllDialogs
vAllDialogs._CollType = COLLALLDIALOGS
- vAllDialogs._ParentType = OBJAPPLICATION
- vAllDialogs._ParentName = &quot;&quot;
vAllDialogs._Count = iCount
Else
If Not bFound Then
@@ -367,8 +363,6 @@ Const cstSeparator = &quot;\;&quot;
Set oCounter = New Collect
Set oCounter._This = oCounter
oCounter._CollType = COLLALLFORMS
- oCounter._ParentType = OBJAPPLICATION
- oCounter._ParentName = &quot;&quot;
If vCurrentDoc.DbConnect = DBCONNECTFORM Then oCounter._Count = UBound(vCurrentDoc.DbContainers) + 1 Else oCounter._Count = UBound(vAllForms) + 1
Set vReturn = oCounter
Goto Exit_Function
@@ -494,8 +488,6 @@ Const cstDot = &quot;.&quot;
Set vAllModules = New Collect
Set vAllModules._This = vAllModules
vAllModules._CollType = COLLALLMODULES
- vAllModules._ParentType = OBJAPPLICATION
- vAllModules._ParentName = &quot;&quot;
vAllModules._Count = 0
Goto Exit_Function
End If
@@ -545,8 +537,6 @@ Const cstDot = &quot;.&quot;
Set vAllModules = New Collect
Set vAllModules._This =vAllModules
vAllModules._CollType = COLLALLMODULES
- vAllModules._ParentType = OBJAPPLICATION
- vAllModules._ParentName = &quot;&quot;
vAllModules._Count = iCount
Else
If Not bFound Then
@@ -728,7 +718,6 @@ Const cstCustom = &quot;CUSTOM&quot;
Set oObject = New Collect
Set oObject._This = oObject
oObject._CollType = COLLCOMMANDBARS
- oObject._ParentType = OBJAPPLICATION
oObject._Count = iObjectsCount
Case VarType(pvIndex) = vbString
Goto Trace_NotFound
@@ -1039,8 +1028,6 @@ Dim iCount As Integer
Set oCounter = New Collect
Set oCounter._This = oCounter
oCounter._CollType = COLLFORMS
- oCounter._ParentType = OBJAPPLICATION
- oCounter._ParentName = &quot;&quot;
oCounter._Count = iCount
Forms = oCounter
Exit Function
diff --git a/wizards/source/access2base/Collect.xba b/wizards/source/access2base/Collect.xba
index 043af979f6b0..f8e24ead323e 100644
--- a/wizards/source/access2base/Collect.xba
+++ b/wizards/source/access2base/Collect.xba
@@ -20,9 +20,7 @@ REM ----------------------------------------------------------------------------
Private _Type As String &apos; Must be COLLECTION
Private _This As Object &apos; Workaround for absence of This builtin function
Private _CollType As String
-Private _ParentType As String
-Private _ParentName As String &apos; Name or shortcut
-Private _ParentDatabase As Object
+Private _Parent As Object
Private _Count As Long
REM -----------------------------------------------------------------------------------------------------------------------
@@ -32,9 +30,7 @@ Private Sub Class_Initialize()
_Type = OBJCOLLECTION
Set _This = Nothing
_CollType = &quot;&quot;
- _ParentType = &quot;&quot;
- _ParentName = &quot;&quot;
- Set _ParentDatabase = Nothing
+ Set _Parent = Nothing
_Count = 0
End Sub &apos; Constructor
@@ -63,6 +59,9 @@ Function Item(ByVal Optional pvItem As Variant) As Variant
&apos;pvItem either numeric index or property name
Const cstThisSub = &quot;Collection.getItem&quot;
+
+ If _ErrorHandler() Then On Local Error Goto Error_Function
+
Utils._SetCalledSub(cstThisSub)
If IsMissing(pvItem) Then Goto Exit_Function &apos; To allow object watching in Basic IDE, do not generate error
Select Case _CollType
@@ -85,66 +84,36 @@ Dim vNames() As Variant, oProperty As Object
Case COLLCOMMANDBARS
Set Item = Application.CommandBars(pvItem)
Case COLLCOMMANDBARCONTROLS
- Set Item = Application.CommandBars(_ParentName).CommandBarControls(pvItem)
+ If IsNull(_Parent) Then GoTo Error_Parent
+ Set Item = _Parent.CommandBarControls(pvItem)
Case COLLCONTROLS
- Select Case _ParentType
- Case OBJCONTROL, OBJSUBFORM
- Set Item = getObject(_ParentName).Controls(pvItem)
- Case OBJDIALOG
- Set Item = Application.AllDialogs(_ParentName).Controls(pvItem)
- Case OBJFORM
- Set Item = Application.Forms(_ParentName).Controls(pvItem)
+ If IsNull(_Parent) Then GoTo Error_Parent
+ Select Case _Parent._Type
+ Case OBJCONTROL, OBJSUBFORM, OBJDIALOG, OBJFORM
+ Set Item = _Parent.Controls(pvItem)
Case OBJOPTIONGROUP
&apos; NOT SUPPORTED
End Select
Case COLLFORMS
Set Item = Application.Forms(pvItem)
Case COLLFIELDS
- Select Case _ParentType
- Case OBJQUERYDEF
- Set Item = _ParentDatabase.QueryDefs(_ParentName).Fields(pvItem)
- Case OBJRECORDSET
- Set Item = _ParentDatabase.Recordsets(_ParentName).Fields(pvItem)
- Case OBJTABLEDEF
- Set Item = _ParentDatabase.TableDefs(_ParentName).Fields(pvItem)
- End Select
+ If IsNull(_Parent) Then GoTo Error_Parent
+ Set Item = _Parent.Fields(pvItem)
Case COLLPROPERTIES
- Select Case _ParentType
- Case OBJCONTROL
- Set Item = getObject(_ParentName).Properties(pvItem)
- Case OBJSUBFORM
- Set Item = getValue(_ParentName).Properties(pvItem)
- Case OBJDATABASE
- Set Item = _ParentDatabase.Properties(pvItem)
- Case OBJDIALOG
- Set Item = Application.AllDialogs(_ParentName).Properties(pvItem)
- Case OBJFIELD
- vNames() = Split(_ParentName, &quot;/&quot;)
- Select Case vNames(0)
- Case OBJQUERYDEF
- Set Item = _ParentDatabase.QueryDefs(vNames(1)).Fields(vNames(2)).Properties(pvItem)
- Case OBJRECORDSET
- Set Item = _ParentDatabase.Recordsets(vNames(1)).Fields(vNames(2)).Properties(pvItem)
- Case OBJTABLEDEF
- Set Item = _ParentDatabase.TableDefs(vNames(1)).Fields(vNames(2)).Properties(pvItem)
- End Select
- Case OBJFORM
- Set Item = Application.Forms(_ParentName).Properties(pvItem)
- Case OBJQUERYDEF
- Set Item = _ParentDatabase.QueryDefs(_ParentName).Properties(pvItem)
- Case OBJRECORDSET
- Set Item = _ParentDatabase.Recordsets(_ParentName).Properties(pvItem)
- Case OBJTABLEDEF
- Set Item = _ParentDatabase.TableDefs(_ParentName).Properties(pvItem)
+ If IsNull(_Parent) Then GoTo Error_Parent
+ Select Case _Parent._Type
+ Case OBJCONTROL, OBJSUBFORM, OBJDATABASE, OBJDIALOG, OBJFIELD _
+ , OBJFORM, OBJQUERYDEF, OBJRECORDSET, OBJTABLEDEF
+ Set Item = _Parent.Properties(pvItem)
Case OBJCOLLECTION, OBJEVENT, OBJOPTIONGROUP, OBJPROPERTY
&apos; NOT SUPPORTED
End Select
Case COLLQUERYDEFS
- Set Item = _ParentDatabase.QueryDefs(pvItem)
+ Set Item = _Parent.QueryDefs(pvItem)
Case COLLRECORDSETS
- Set Item = _ParentDatabase.Recordsets(pvItem)
+ Set Item = _Parent.Recordsets(pvItem)
Case COLLTABLEDEFS
- Set Item = _ParentDatabase.TableDefs(pvItem)
+ Set Item = _Parent.TableDefs(pvItem)
Case COLLTEMPVARS
Set Item = Application.TempVars(pvItem)
Case Else
@@ -157,7 +126,11 @@ Error_Function:
TraceError(TRACEABORT, Err, Utils._CalledSub(), Erl)
Set Item = Nothing
GoTo Exit_Function
-End Function &apos; V1.1.0
+Error_Parent:
+ TraceError(TRACEFATAL, ERROBJECTNOTFOUND, Utils._CalledSub(), 0, True, Array(_GetLabel(&quot;OBJECT&quot;), _GetLabel(&quot;PARENT&quot;)))
+ Set Item = Nothing
+ GoTo Exit_Function
+End Function &apos; Item V1.1.0
REM -----------------------------------------------------------------------------------------------------------------------
Property Get ObjectType() As String
@@ -174,9 +147,9 @@ Dim vProperty As Variant, vPropertiesList() As Variant, sObject As String
vPropertiesList = _PropertiesList()
sObject = Utils._PCase(_Type)
If IsMissing(pvIndex) Then
- vProperty = PropertiesGet._Properties(sObject, _ParentName, vPropertiesList)
+ vProperty = PropertiesGet._Properties(sObject, _This, vPropertiesList)
Else
- vProperty = PropertiesGet._Properties(sObject, _ParentName, vPropertiesList, pvIndex)
+ vProperty = PropertiesGet._Properties(sObject, _This, vPropertiesList, pvIndex)
vProperty._Value = _PropertyGet(vPropertiesList(pvIndex))
End If
diff --git a/wizards/source/access2base/CommandBar.xba b/wizards/source/access2base/CommandBar.xba
index 45a0ad513f1d..69e2e97efc74 100644
--- a/wizards/source/access2base/CommandBar.xba
+++ b/wizards/source/access2base/CommandBar.xba
@@ -84,9 +84,9 @@ Dim vProperty As Variant, vPropertiesList() As Variant, sObject As String
vPropertiesList = _PropertiesList()
sObject = Utils._PCase(_Type)
If IsMissing(pvIndex) Then
- vProperty = PropertiesGet._Properties(sObject, _Name, vPropertiesList)
+ vProperty = PropertiesGet._Properties(sObject, _This, vPropertiesList)
Else
- vProperty = PropertiesGet._Properties(sObject, _Name, vPropertiesList, pvIndex)
+ vProperty = PropertiesGet._Properties(sObject, _This, vPropertiesList, pvIndex)
vProperty._Value = _PropertyGet(vPropertiesList(pvIndex))
End If
@@ -174,8 +174,7 @@ Dim oObject As Object
Set oObject = New Collect
Set oObject._This = oObject
oObject._CollType = COLLCOMMANDBARCONTROLS
- oObject._ParentType = OBJCOMMANDBAR
- oObject._ParentName = _Name
+ Set oObject._Parent = _This
oObject._Count = iItemsCount
Case Else &apos; pvIndex is numeric
Goto Trace_IndexError
diff --git a/wizards/source/access2base/CommandBarControl.xba b/wizards/source/access2base/CommandBarControl.xba
index f0c7403cbb51..b4676ea48fcf 100644
--- a/wizards/source/access2base/CommandBarControl.xba
+++ b/wizards/source/access2base/CommandBarControl.xba
@@ -108,9 +108,9 @@ Dim vProperty As Variant, vPropertiesList() As Variant, sObject As String
vPropertiesList = _PropertiesList()
sObject = Utils._PCase(_Type)
If IsMissing(pvIndex) Then
- vProperty = PropertiesGet._Properties(sObject, _Name, vPropertiesList)
+ vProperty = PropertiesGet._Properties(sObject, _This, vPropertiesList)
Else
- vProperty = PropertiesGet._Properties(sObject, _Name, vPropertiesList, pvIndex)
+ vProperty = PropertiesGet._Properties(sObject, _This, vPropertiesList, pvIndex)
vProperty._Value = _PropertyGet(vPropertiesList(pvIndex))
End If
diff --git a/wizards/source/access2base/Control.xba b/wizards/source/access2base/Control.xba
index 39afaee804a3..1c8a994d3d5c 100644
--- a/wizards/source/access2base/Control.xba
+++ b/wizards/source/access2base/Control.xba
@@ -522,9 +522,9 @@ Dim vProperty As Variant, vPropertiesList() As Variant, sObject As String
vPropertiesList = _PropertiesList()
sObject = Utils._PCase(_Type)
If IsMissing(pvIndex) Then
- vProperty = PropertiesGet._Properties(sObject, _Shortcut, vPropertiesList)
+ vProperty = PropertiesGet._Properties(sObject, _This, vPropertiesList)
Else
- vProperty = PropertiesGet._Properties(sObject, _Shortcut, vPropertiesList, pvIndex)
+ vProperty = PropertiesGet._Properties(sObject, _This, vPropertiesList, pvIndex)
vProperty._Value = _PropertyGet(vPropertiesList(pvIndex))
End If
@@ -769,8 +769,7 @@ Dim j As Integer, oView As Object
Set oCounter = New Collect
Set oCounter._This = oCounter
oCounter._CollType = COLLCONTROLS
- oCounter._ParentType = OBJCONTROL
- oCounter._ParentName = _Shortcut
+ Set oCounter._Parent = _This
oCounter._Count = iControlCount
Set Controls = oCounter
Goto Exit_Function
diff --git a/wizards/source/access2base/DataDef.xba b/wizards/source/access2base/DataDef.xba
index 0202e13b0064..57ec601908cd 100644
--- a/wizards/source/access2base/DataDef.xba
+++ b/wizards/source/access2base/DataDef.xba
@@ -282,9 +282,7 @@ Dim i As Integer, bFound As Boolean, oFields As Object
Set oObject = New Collect
Set oObject._This = oObject
oObject._CollType = COLLFIELDS
- oObject._ParentType = _Type
- oObject._ParentName = _Name
- Set oObject._ParentDatabase = _ParentDatabase
+ Set oObject._Parent = _This
oObject._Count = UBound(sObjects) + 1
Goto Exit_Function
Case VarType(pvIndex) = vbString
@@ -435,9 +433,9 @@ Dim cstThisSub As String
vPropertiesList = _PropertiesList()
sObject = Utils._PCase(_Type)
If IsMissing(pvIndex) Then
- vProperty = PropertiesGet._Properties(sObject, _Name, vPropertiesList)
+ vProperty = PropertiesGet._Properties(sObject, _This, vPropertiesList)
Else
- vProperty = PropertiesGet._Properties(sObject, _Name, vPropertiesList, pvIndex)
+ vProperty = PropertiesGet._Properties(sObject, _This, vPropertiesList, pvIndex)
vProperty._Value = _PropertyGet(vPropertiesList(pvIndex))
End If
Set vProperty._ParentDatabase = _ParentDatabase
@@ -452,7 +450,7 @@ REM ----------------------------------------------------------------------------
Public Function setProperty(ByVal Optional psProperty As String, ByVal Optional pvValue As Variant) As Boolean
&apos; Return True if property setting OK
Dim cstThisSub As String
- cstThisSub = Utils._PCase(_Type) &amp; &quot;.getProperty&quot;
+ cstThisSub = Utils._PCase(_Type) &amp; &quot;.setProperty&quot;
Utils._SetCalledSub(cstThisSub)
setProperty = _PropertySet(psProperty, pvValue)
Utils._ResetCalledSub(cstThisSub)
diff --git a/wizards/source/access2base/Database.xba b/wizards/source/access2base/Database.xba
index 10fb447b2951..bf0aaee41f95 100644
--- a/wizards/source/access2base/Database.xba
+++ b/wizards/source/access2base/Database.xba
@@ -873,9 +873,9 @@ Dim vProperty As Variant, vPropertiesList() As Variant, sObject As String
vPropertiesList = _PropertiesList()
sObject = Utils._PCase(_Type)
If IsMissing(pvIndex) Then
- vProperty = PropertiesGet._Properties(sObject, &quot;&quot;, vPropertiesList)
+ vProperty = PropertiesGet._Properties(sObject, _This, vPropertiesList)
Else
- vProperty = PropertiesGet._Properties(sObject, &quot;&quot;, vPropertiesList, pvIndex)
+ vProperty = PropertiesGet._Properties(sObject, _This, vPropertiesList, pvIndex)
vProperty._Value = _PropertyGet(vPropertiesList(pvIndex))
End If
Set vProperty._ParentDatabase = _This
@@ -909,9 +909,7 @@ Dim i As Integer, bFound As Boolean, oQueries As Object
Set oObject = New Collect
Set oObject._This = oObject
oObject._CollType = COLLQUERYDEFS
- oObject._ParentType = OBJDATABASE
- oObject._ParentName = &quot;&quot;
- Set oObject._ParentDatabase = _This
+ Set oObject._Parent = _This
oObject._Count = UBound(sObjects) + 1
Goto Exit_Function
Case VarType(pvIndex) = vbString
@@ -974,9 +972,7 @@ Dim i As Integer, bFound As Boolean, oTables As Object
Set oObject = New Collect
Set oObject._This = oObject
oObject._CollType = COLLRECORDSETS
- oObject._ParentType = OBJDATABASE
- oObject._ParentName = &quot;&quot;
- Set oObject._ParentDatabase = _This
+ Set oObject._Parent = _This
oObject._Count = RecordsetsColl.Count
Case VarType(pvIndex) = vbString
bFound = _hasRecordset(pvIndex)
@@ -1068,9 +1064,7 @@ Dim i As Integer, bFound As Boolean, oTables As Object
Set oObject = New Collect
Set oObject._This = oObject
oObject._CollType = COLLTABLEDEFS
- oObject._ParentType = OBJDATABASE
- oObject._ParentName = &quot;&quot;
- Set oObject._ParentDatabase = _This
+ Set oObject._Parent = _This
oObject._Count = UBound(sObjects) + 1
Goto Exit_Function
Case VarType(pvIndex) = vbString
diff --git a/wizards/source/access2base/Dialog.xba b/wizards/source/access2base/Dialog.xba
index 244f5a11be83..935f7cf7debc 100644
--- a/wizards/source/access2base/Dialog.xba
+++ b/wizards/source/access2base/Dialog.xba
@@ -305,9 +305,9 @@ Dim vProperty As Variant, vPropertiesList() As Variant, sObject As String
vPropertiesList = _PropertiesList()
sObject = Utils._PCase(_Type)
If IsMissing(pvIndex) Then
- vProperty = PropertiesGet._Properties(sObject, _Name, vPropertiesList)
+ vProperty = PropertiesGet._Properties(sObject, _This, vPropertiesList)
Else
- vProperty = PropertiesGet._Properties(sObject, _Name, vPropertiesList, pvIndex)
+ vProperty = PropertiesGet._Properties(sObject, _This, vPropertiesList, pvIndex)
vProperty._Value = _PropertyGet(vPropertiesList(pvIndex))
End If
@@ -363,6 +363,7 @@ Dim j As Integer
Set oCounter._This = oCounter
oCounter._CollType = COLLCONTROLS
oCounter._Count = iControlCount
+ Set oCounter._Parent = _This
Set Controls = oCounter
Goto Exit_Function
End If
diff --git a/wizards/source/access2base/Event.xba b/wizards/source/access2base/Event.xba
index 917264ac2a93..eb5f23019aaf 100644
--- a/wizards/source/access2base/Event.xba
+++ b/wizards/source/access2base/Event.xba
@@ -169,9 +169,9 @@ Dim vProperty As Variant, vPropertiesList() As Variant, sObject As String
vPropertiesList = _PropertiesList()
sObject = Utils._PCase(_Type)
If IsMissing(pvIndex) Then
- vProperty = PropertiesGet._Properties(sObject, &quot;&quot;, vPropertiesList)
+ vProperty = PropertiesGet._Properties(sObject, _This, vPropertiesList)
Else
- vProperty = PropertiesGet._Properties(sObject, &quot;&quot;, vPropertiesList, pvIndex)
+ vProperty = PropertiesGet._Properties(sObject, _This, vPropertiesList, pvIndex)
vProperty._Value = _PropertyGet(vPropertiesList(pvIndex))
End If
diff --git a/wizards/source/access2base/Field.xba b/wizards/source/access2base/Field.xba
index 7fd2f704383a..35d21aa2f7a1 100644
--- a/wizards/source/access2base/Field.xba
+++ b/wizards/source/access2base/Field.xba
@@ -290,12 +290,12 @@ Const cstThisSub = &quot;Field.Properties&quot;
sObject = Utils._PCase(_Type)
sName = _ParentType &amp; &quot;/&quot; &amp; _ParentName &amp; &quot;/&quot; &amp; _Name
If IsMissing(pvIndex) Then
- vProperty = PropertiesGet._Properties(sObject, sName, vPropertiesList)
+ vProperty = PropertiesGet._Properties(sObject, _This, vPropertiesList)
Else
- vProperty = PropertiesGet._Properties(sObject, sName, vPropertiesList, pvIndex)
+ vProperty = PropertiesGet._Properties(sObject, _This, vPropertiesList, pvIndex)
vProperty._Value = _PropertyGet(vPropertiesList(pvIndex))
+ Set vProperty._ParentDatabase = _ParentDatabase
End If
- Set vProperty._ParentDatabase = _ParentDatabase
Exit_Function:
Set Properties = vProperty
diff --git a/wizards/source/access2base/Form.xba b/wizards/source/access2base/Form.xba
index e9c87c803811..f05d326dc1cc 100644
--- a/wizards/source/access2base/Form.xba
+++ b/wizards/source/access2base/Form.xba
@@ -407,9 +407,9 @@ Dim vProperty As Variant, vPropertiesList() As Variant, sObject As String
vPropertiesList = _PropertiesList()
sObject = Utils._PCase(_Type)
If IsMissing(pvIndex) Then
- vProperty = PropertiesGet._Properties(sObject, _Name, vPropertiesList)
+ vProperty = PropertiesGet._Properties(sObject, _This, vPropertiesList)
Else
- vProperty = PropertiesGet._Properties(sObject, _Name, vPropertiesList, pvIndex)
+ vProperty = PropertiesGet._Properties(sObject, _This, vPropertiesList, pvIndex)
vProperty._Value = _PropertyGet(vPropertiesList(pvIndex))
End If
@@ -506,8 +506,7 @@ Dim oDatabaseForm As Object, iCtlCount As Integer
Set oCounter = New Collect
Set oCounter._This = oCounter
oCounter._CollType = COLLCONTROLS
- oCounter._ParentType = OBJFORM
- oCounter._ParentName = _Name
+ Set oCounter._Parent = _This
oCounter._Count = iControlCount
Set Controls = oCounter
Goto Exit_Function
diff --git a/wizards/source/access2base/Module.xba b/wizards/source/access2base/Module.xba
index 383d792a4f0f..34d7c244cb92 100644
--- a/wizards/source/access2base/Module.xba
+++ b/wizards/source/access2base/Module.xba
@@ -238,9 +238,9 @@ Dim vProperty As Variant, vPropertiesList() As Variant, sObject As String
vPropertiesList = _PropertiesList()
sObject = Utils._PCase(_Type)
If IsMissing(pvIndex) Then
- vProperty = PropertiesGet._Properties(sObject, _Name, vPropertiesList)
+ vProperty = PropertiesGet._Properties(sObject, _This, vPropertiesList)
Else
- vProperty = PropertiesGet._Properties(sObject, _Name, vPropertiesList, pvIndex)
+ vProperty = PropertiesGet._Properties(sObject, _This, vPropertiesList, pvIndex)
vProperty._Value = _PropertyGet(vPropertiesList(pvIndex))
End If
diff --git a/wizards/source/access2base/OptionGroup.xba b/wizards/source/access2base/OptionGroup.xba
index 6eeac087a7eb..080fde83b7cb 100644
--- a/wizards/source/access2base/OptionGroup.xba
+++ b/wizards/source/access2base/OptionGroup.xba
@@ -85,9 +85,9 @@ Dim vProperty As Variant, vPropertiesList() As Variant, sObject As String
vPropertiesList = _PropertiesList()
sObject = Utils._PCase(_Type)
If IsMissing(pvIndex) Then
- vProperty = PropertiesGet._Properties(sObject, _Name, vPropertiesList)
+ vProperty = PropertiesGet._Properties(sObject, _This, vPropertiesList)
Else
- vProperty = PropertiesGet._Properties(sObject, _Name, vPropertiesList, pvIndex)
+ vProperty = PropertiesGet._Properties(sObject, _This, vPropertiesList, pvIndex)
vProperty._Value = _PropertyGet(vPropertiesList(pvIndex))
End If
@@ -122,8 +122,7 @@ Dim ocControl As Variant, iArgNr As Integer, i As Integer
Set oCounter = New Collect
Set oCounter._This = oCounter
oCounter._SubType = OBJCONTROL
- oCounter._ParentType = OBJOPTIONGROUP
- oCounter._ParentName = _Name
+ Set oCounter._Parent = _This
oCounter._Count = _Count
Set Controls = oCounter
Goto Exit_Function
diff --git a/wizards/source/access2base/PropertiesGet.xba b/wizards/source/access2base/PropertiesGet.xba
index 46433027a601..3ada734ee766 100644
--- a/wizards/source/access2base/PropertiesGet.xba
+++ b/wizards/source/access2base/PropertiesGet.xba
@@ -1148,7 +1148,7 @@ End Function &apos; _ParentObject V0.9.0
REM -----------------------------------------------------------------------------------------------------------------------
Public Function _Properties(ByVal psObject As String _
- , ByVal psObjectName As String _
+ , ByRef pvParent As Object _
, ByVal pvPropertiesList() As Variant _
, ByVal Optional pvIndex As Variant _
) As Variant
@@ -1168,8 +1168,7 @@ Dim iArgNr As Integer, iLen As Integer
Set oCounter = New Collect
Set oCounter._This = oCounter
oCounter._CollType = COLLPROPERTIES
- oCounter._ParentType = UCase(psObject)
- oCounter._ParentName = psObjectName
+ Set oCounter._Parent = pvParent
oCounter._Count = UBound(pvPropertiesList) + 1
Set vProperties = oCounter
Else
diff --git a/wizards/source/access2base/Property.xba b/wizards/source/access2base/Property.xba
index 178f29b0ff9a..c64b0066a786 100644
--- a/wizards/source/access2base/Property.xba
+++ b/wizards/source/access2base/Property.xba
@@ -69,9 +69,9 @@ Dim vProperty As Variant, vPropertiesList() As Variant, sObject As String
vPropertiesList = _PropertiesList()
sObject = Utils._PCase(_Type)
If IsMissing(pvIndex) Then
- vProperty = PropertiesGet._Properties(sObject, _Name, vPropertiesList)
+ vProperty = PropertiesGet._Properties(sObject, _This, vPropertiesList)
Else
- vProperty = PropertiesGet._Properties(sObject, _Name, vPropertiesList, pvIndex)
+ vProperty = PropertiesGet._Properties(sObject, _This, vPropertiesList, pvIndex)
vProperty._Value = _PropertyGet(vPropertiesList(pvIndex))
End If
diff --git a/wizards/source/access2base/Recordset.xba b/wizards/source/access2base/Recordset.xba
index 0dcb682157eb..e9ad9e20cbc4 100644
--- a/wizards/source/access2base/Recordset.xba
+++ b/wizards/source/access2base/Recordset.xba
@@ -498,9 +498,7 @@ Dim i As Integer, oFields As Object, iIndex As Integer
Set oObject = New Collect
Set oObject._This = oObject
oObject._CollType = COLLFIELDS
- oObject._ParentType = OBJRECORDSET
- oObject._ParentName = _Name
- Set oObject._ParentDatabase = _ParentDatabase
+ Set oObject._Parent = _This
oObject._Count = RowSet.getColumns().Count
Goto Exit_Function
End If
@@ -758,9 +756,9 @@ Dim vProperty As Variant, vPropertiesList() As Variant, sObject As String
vPropertiesList = _PropertiesList()
sObject = Utils._PCase(_Type)
If IsMissing(pvIndex) Then
- vProperty = PropertiesGet._Properties(sObject, _Name, vPropertiesList)
+ vProperty = PropertiesGet._Properties(sObject, _This, vPropertiesList)
Else
- vProperty = PropertiesGet._Properties(sObject, _Name, vPropertiesList, pvIndex)
+ vProperty = PropertiesGet._Properties(sObject, _This, vPropertiesList, pvIndex)
vProperty._Value = _PropertyGet(vPropertiesList(pvIndex))
End If
Set vProperty._ParentDatabase = _ParentDatabase
diff --git a/wizards/source/access2base/Root_.xba b/wizards/source/access2base/Root_.xba
index dfb9c075f0ca..73f743278a57 100644
--- a/wizards/source/access2base/Root_.xba
+++ b/wizards/source/access2base/Root_.xba
@@ -42,7 +42,7 @@ Private StatusBar As Object
Private Dialogs As Object &apos; Collection
Private TempVars As Object &apos; Collection
Private CurrentDoc() As Variant &apos; Array of document containers - [0] = Base document, [1 ... N] = other documents
-Private PythonVars() As Variant &apos; Array of objects created in Python scripts
+Private PythonCache() As Variant &apos; Array of objects created in Python scripts
REM -----------------------------------------------------------------------------------------------------------------------
REM --- CONSTRUCTORS / DESTRUCTORS ---
@@ -78,7 +78,7 @@ Private Sub Class_Initialize()
CurrentDoc = Array()
ReDim CurrentDoc(0 To 0)
Set CurrentDoc(0) = Nothing
- PythonVars = Array()
+ PythonCache = Array()
End Sub &apos; Constructor
REM -----------------------------------------------------------------------------------------------------------------------
@@ -101,13 +101,13 @@ REM ----------------------------------------------------------------------------
REM -----------------------------------------------------------------------------------------------------------------------
Public Function AddPython(ByRef pvObject As Variant) As Long
-&apos; Store the object as a new entry in PythonVars and return its entry number
+&apos; Store the object as a new entry in PythonCache and return its entry number
Dim lVars As Long, vObject As Variant
- lVars = UBound(PythonVars) + 1
- ReDim Preserve PythonVars(0 To lVars)
- PythonVars(lVars) = pvObject
+ lVars = UBound(PythonCache) + 1
+ ReDim Preserve PythonCache(0 To lVars)
+ PythonCache(lVars) = pvObject
AddPython = lVars
diff --git a/wizards/source/access2base/SubForm.xba b/wizards/source/access2base/SubForm.xba
index 85556e8d4716..30add0f38a09 100644
--- a/wizards/source/access2base/SubForm.xba
+++ b/wizards/source/access2base/SubForm.xba
@@ -338,9 +338,9 @@ Dim vProperty As Variant, vPropertiesList() As Variant, sObject As String
vPropertiesList = _PropertiesList()
sObject = Utils._PCase(_Type)
If IsMissing(pvIndex) Then
- vProperty = PropertiesGet._Properties(sObject, _Shortcut, vPropertiesList)
+ vProperty = PropertiesGet._Properties(sObject, _This, vPropertiesList)
Else
- vProperty = PropertiesGet._Properties(sObject, _Shortcut, vPropertiesList, pvIndex)
+ vProperty = PropertiesGet._Properties(sObject, _This, vPropertiesList, pvIndex)
vProperty._Value = _PropertyGet(vPropertiesList(pvIndex))
End If
@@ -383,8 +383,7 @@ Dim j As Integer
Set oCounter = New Collect
Set oCounter._This = oCounter
oCounter._CollType = COLLCONTROLS
- oCounter._ParentType = OBJSUBFORM
- oCounter._ParentName = _Shortcut
+ oCounter._Parent = _This
oCounter._Count = iControlCount
Set Controls = oCounter
Goto Exit_Function
diff --git a/wizards/source/access2base/TempVar.xba b/wizards/source/access2base/TempVar.xba
index b7a053dc78ce..411ad6336d59 100644
--- a/wizards/source/access2base/TempVar.xba
+++ b/wizards/source/access2base/TempVar.xba
@@ -70,10 +70,10 @@ REM ----------------------------------------------------------------------------
Public Function getProperty(Optional ByVal pvProperty As Variant) As Variant
&apos; Return property value of psProperty property name
- Utils._SetCalledSub(&quot;Property.getProperty&quot;)
+ Utils._SetCalledSub(&quot;TempVar.getProperty&quot;)
If IsMissing(pvProperty) Then Call _TraceArguments()
getProperty = _PropertyGet(pvProperty)
- Utils._ResetCalledSub(&quot;Property.getProperty&quot;)
+ Utils._ResetCalledSub(&quot;TempVar.getProperty&quot;)
End Function &apos; getProperty
@@ -96,9 +96,9 @@ Dim vProperty As Variant, vPropertiesList() As Variant, sObject As String
vPropertiesList = _PropertiesList()
sObject = Utils._PCase(_Type)
If IsMissing(pvIndex) Then
- vProperty = PropertiesGet._Properties(sObject, _Name, vPropertiesList)
+ vProperty = PropertiesGet._Properties(sObject, _This, vPropertiesList)
Else
- vProperty = PropertiesGet._Properties(sObject, _Name, vPropertiesList, pvIndex)
+ vProperty = PropertiesGet._Properties(sObject, _This, vPropertiesList, pvIndex)
vProperty._Value = _PropertyGet(vPropertiesList(pvIndex))
End If
@@ -110,11 +110,9 @@ End Function &apos; Properties
REM -----------------------------------------------------------------------------------------------------------------------
Public Function setProperty(ByVal Optional psProperty As String, ByVal Optional pvValue As Variant) As Boolean
&apos; Return True if property setting OK
-Dim cstThisSub As String
- cstThisSub = Utils._PCase(_Type) &amp; &quot;.getProperty&quot;
- Utils._SetCalledSub(cstThisSub)
+ Utils._SetCalledSub(&quot;TempVar.getProperty&quot;)
setProperty = _PropertySet(psProperty, pvValue)
- Utils._ResetCalledSub(cstThisSub)
+ Utils._ResetCalledSub(&quot;TempVar.getProperty&quot;)
End Function
REM -----------------------------------------------------------------------------------------------------------------------
diff --git a/wizards/source/access2base/acConstants.xba b/wizards/source/access2base/acConstants.xba
index 462a6a60b5d1..d61cf0b31dc4 100644
--- a/wizards/source/access2base/acConstants.xba
+++ b/wizards/source/access2base/acConstants.xba
@@ -149,7 +149,7 @@ Global Const acSubform = 112
Global Const acTextField = 9 : Global Const acTextBox = 9
Global Const acTimeField = 16
-REM Record
+REM AcRecord
REM -----------------------------------------------------------------
Global Const acFirst = 2
Global Const acGoTo = 4
@@ -178,15 +178,6 @@ Global Const acDataServerView = 7
Global Const acDataStoredProcedure = 9
Global Const acDataTable = 0
-REM AcRecord
-REM -----------------------------------------------------------------
-Global Const acFirst = 2
-Global Const acGoTo = 4
-Global Const acLast = 3
-Global Const acNewRec = 5
-Global Const acNext = 1
-Global Const acPrevious = 0
-
REM AcQuitOption
REM -----------------------------------------------------------------
Global Const acQuitPrompt = 0
@@ -223,19 +214,13 @@ Global Const acCmdNewObjectForm = 136
Global Const acCmdNewObjectTable = 134
Global Const acCmdNewObjectView = 350
Global Const acCmdOpenDatabase = 25
-Global Const acCmdRemove = 366
-Global Const acCmdDesignView = 183
Global Const acCmdNewObjectQuery = 135
Global Const acCmdShowAllRelationships = 149
-Global Const acCmdRemove = 366
-Global Const acCmdDesignView = 183
Global Const acCmdNewObjectReport = 137
Global Const acCmdSelectAll = 333
Global Const acCmdRemoveTable = 84
-Global Const acCmdDesignView = 183
Global Const acCmdOpenTable = 221
Global Const acCmdRename = 143
-Global Const acCmdDelete = 337
Global Const acCmdDeleteRecord = 223
Global Const acCmdApplyFilterSort = 93
Global Const acCmdSnapToGrid = 62
@@ -255,8 +240,6 @@ Global Const acCmdRemoveFilterSort = 144
Global Const acCmdRunMacro = 31
Global Const acCmdSave = 20
Global Const acCmdSaveAs = 21
-Global Const acCmdFind = 30
-Global Const acCmdSelectAll = 333
Global Const acCmdSelectAllRecords = 109
Global Const acCmdSendToBack = 53
Global Const acCmdSortDescending = 164