summaryrefslogtreecommitdiff
path: root/wizards
diff options
context:
space:
mode:
authorJean-Pierre Ledure <jp@ledure.be>2016-11-30 12:22:34 +0100
committerJean-Pierre Ledure <jp@ledure.be>2017-01-12 11:40:49 +0100
commit076084a71758fcdc2eca6099d3ec8bd262e7e46b (patch)
tree07b0f64ec053ab20b56eb191f1837db320ac57af /wizards
parente442b7666761b4e38de2e3eb2b1ed04f54b095a8 (diff)
Access2Base - Implement On ... event properties
Event properties applied to form, subform, control events Controls may belong to forms, subforms, dialogs, grid controls Change-Id: Iaf33adcd03527ac938913675cf0930e317a17f97
Diffstat (limited to 'wizards')
-rw-r--r--wizards/source/access2base/Collect.xba4
-rw-r--r--wizards/source/access2base/Compatible.xba4
-rw-r--r--wizards/source/access2base/Control.xba402
-rw-r--r--wizards/source/access2base/Form.xba192
-rw-r--r--wizards/source/access2base/Root_.xba2
-rw-r--r--wizards/source/access2base/SubForm.xba189
-rw-r--r--wizards/source/access2base/Utils.xba95
-rw-r--r--wizards/source/access2base/acConstants.xba2
8 files changed, 813 insertions, 77 deletions
diff --git a/wizards/source/access2base/Collect.xba b/wizards/source/access2base/Collect.xba
index 74cd756c00f2..ad33cc77a810 100644
--- a/wizards/source/access2base/Collect.xba
+++ b/wizards/source/access2base/Collect.xba
@@ -105,8 +105,10 @@ Dim vNames() As Variant, oProperty As Object
End Select
Case COLLPROPERTIES
Select Case _ParentType
- Case OBJCONTROL, OBJSUBFORM
+ 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
diff --git a/wizards/source/access2base/Compatible.xba b/wizards/source/access2base/Compatible.xba
index 30cab096180f..92012b56a420 100644
--- a/wizards/source/access2base/Compatible.xba
+++ b/wizards/source/access2base/Compatible.xba
@@ -19,7 +19,7 @@ Dim vVarTypes() As Variant, i As Integer
Const cstTab = 5
On Local Error Goto Exit_Sub &apos; Never interrupt processing
Utils._SetCalledSub(&quot;DebugPrint&quot;)
- vVarTypes = Utils._AddNumeric(Array(vbEmpty, vbNull, vbDate, vbString, vbBoolean, vbObject, vbVariant, vbByte, 8192 + vbByte))
+ vVarTypes = Utils._AddNumeric(Array(vbEmpty, vbNull, vbDate, vbString, vbBoolean, vbObject, vbVariant, vbByte, vbArray + vbByte))
If UBound(pvArgs) &gt;= 0 Then
For i = 0 To UBound(pvArgs)
@@ -34,7 +34,7 @@ Const cstTab = 5
Dim sOutput As String, sArg As String
sOutput = &quot;&quot;
For i = 0 To UBound(pvArgs)
- sArg = Utils._CStr(pvArgs(i))
+ sArg = Utils._CStr(pvArgs(i), _A2B_.DebugPrintShort)
&apos; Add argument to output
If i = 0 Then
sOutput = sArg
diff --git a/wizards/source/access2base/Control.xba b/wizards/source/access2base/Control.xba
index 040a1817edfb..f02b46cca644 100644
--- a/wizards/source/access2base/Control.xba
+++ b/wizards/source/access2base/Control.xba
@@ -26,7 +26,7 @@ Private _DbEntry As Integer
Private _ControlType As Integer
Private _SubType As String
Private ControlModel As Object &apos; com.sun.star.comp.forms.XXXModel
-Private ControlView As Object &apos; com.sun.star.comp.forms.XXXControl
+Private ControlView As Object &apos; com.sun.star.comp.forms.XXXControl (NULL if form open in edit mode)
Private BoundField As Object &apos; com.sun.star.sdb.ODataColumn
Private LabelControl As Object &apos; com.sun.star.form.component.FixedText or com.sun.star.form.component.GroupBox
@@ -284,6 +284,195 @@ Property Get ObjectType() As String
End Property &apos; ObjectType (get)
REM -----------------------------------------------------------------------------------------------------------------------
+Property Get OnActionPerformed() As Variant
+ OnActionPerformed = _PropertyGet(&quot;OnActionPerformed&quot;)
+End Property &apos; OnActionPerformed (get)
+
+Property Let OnActionPerformed(ByVal pvValue As Variant)
+ Call _PropertySet(&quot;OnActionPerformed&quot;, pvValue)
+End Property &apos; OnActionPerformed (set)
+
+REM -----------------------------------------------------------------------------------------------------------------------
+Property Get OnAdjustmentValueChanged() As Variant
+ OnAdjustmentValueChanged = _PropertyGet(&quot;OnAdjustmentValueChanged&quot;)
+End Property &apos; OnAdjustmentValueChanged (get)
+
+Property Let OnAdjustmentValueChanged(ByVal pvValue As Variant)
+ Call _PropertySet(&quot;OnAdjustmentValueChanged&quot;, pvValue)
+End Property &apos; OnAdjustmentValueChanged (set)
+
+REM -----------------------------------------------------------------------------------------------------------------------
+Property Get OnApproveAction() As Variant
+ OnApproveAction = _PropertyGet(&quot;OnApproveAction&quot;)
+End Property &apos; OnApproveAction (get)
+
+Property Let OnApproveAction(ByVal pvValue As Variant)
+ Call _PropertySet(&quot;OnApproveAction&quot;, pvValue)
+End Property &apos; OnApproveAction (set)
+
+REM -----------------------------------------------------------------------------------------------------------------------
+Property Get OnApproveReset() As Variant
+ OnApproveReset = _PropertyGet(&quot;OnApproveReset&quot;)
+End Property &apos; OnApproveReset (get)
+
+Property Let OnApproveReset(ByVal pvValue As Variant)
+ Call _PropertySet(&quot;OnApproveReset&quot;, pvValue)
+End Property &apos; OnApproveReset (set)
+
+REM -----------------------------------------------------------------------------------------------------------------------
+Property Get OnApproveUpdate() As Variant
+ OnApproveUpdate = _PropertyGet(&quot;OnApproveUpdate&quot;)
+End Property &apos; OnApproveUpdate (get)
+
+Property Let OnApproveUpdate(ByVal pvValue As Variant)
+ Call _PropertySet(&quot;OnApproveUpdate&quot;, pvValue)
+End Property &apos; OnApproveUpdate (set)
+
+REM -----------------------------------------------------------------------------------------------------------------------
+Property Get OnChanged() As Variant
+ OnChanged = _PropertyGet(&quot;OnChanged&quot;)
+End Property &apos; OnChanged (get)
+
+Property Let OnChanged(ByVal pvValue As Variant)
+ Call _PropertySet(&quot;OnChanged&quot;, pvValue)
+End Property &apos; OnChanged (set)
+
+REM -----------------------------------------------------------------------------------------------------------------------
+Property Get OnErrorOccurred() As Variant
+ OnErrorOccurred = _PropertyGet(&quot;OnErrorOccurred&quot;)
+End Property &apos; OnErrorOccurred (get)
+
+Property Let OnErrorOccurred(ByVal pvValue As Variant)
+ Call _PropertySet(&quot;OnErrorOccurred&quot;, pvValue)
+End Property &apos; OnErrorOccurred (set)
+
+REM -----------------------------------------------------------------------------------------------------------------------
+Property Get OnFocusGained() As Variant
+ OnFocusGained = _PropertyGet(&quot;OnFocusGained&quot;)
+End Property &apos; OnFocusGained (get)
+
+Property Let OnFocusGained(ByVal pvValue As Variant)
+ Call _PropertySet(&quot;OnFocusGained&quot;, pvValue)
+End Property &apos; OnFocusGained (set)
+
+REM -----------------------------------------------------------------------------------------------------------------------
+Property Get OnFocusLost() As Variant
+ OnFocusLost = _PropertyGet(&quot;OnFocusLost&quot;)
+End Property &apos; OnFocusLost (get)
+
+Property Let OnFocusLost(ByVal pvValue As Variant)
+ Call _PropertySet(&quot;OnFocusLost&quot;, pvValue)
+End Property &apos; OnFocusLost (set)
+
+REM -----------------------------------------------------------------------------------------------------------------------
+Property Get OnItemStateChanged() As Variant
+ OnItemStateChanged = _PropertyGet(&quot;OnItemStateChanged&quot;)
+End Property &apos; OnItemStateChanged (get)
+
+Property Let OnItemStateChanged(ByVal pvValue As Variant)
+ Call _PropertySet(&quot;OnItemStateChanged&quot;, pvValue)
+End Property &apos; OnItemStateChanged (set)
+
+REM -----------------------------------------------------------------------------------------------------------------------
+Property Get OnKeyPressed() As Variant
+ OnKeyPressed = _PropertyGet(&quot;OnKeyPressed&quot;)
+End Property &apos; OnKeyPressed (get)
+
+Property Let OnKeyPressed(ByVal pvValue As Variant)
+ Call _PropertySet(&quot;OnKeyPressed&quot;, pvValue)
+End Property &apos; OnKeyPressed (set)
+
+REM -----------------------------------------------------------------------------------------------------------------------
+Property Get OnKeyReleased() As Variant
+ OnKeyReleased = _PropertyGet(&quot;OnKeyReleased&quot;)
+End Property &apos; OnKeyReleased (get)
+
+Property Let OnKeyReleased(ByVal pvValue As Variant)
+ Call _PropertySet(&quot;OnKeyReleased&quot;, pvValue)
+End Property &apos; OnKeyReleased (set)
+
+REM -----------------------------------------------------------------------------------------------------------------------
+Property Get OnMouseDragged() As Variant
+ OnMouseDragged = _PropertyGet(&quot;OnMouseDragged&quot;)
+End Property &apos; OnMouseDragged (get)
+
+Property Let OnMouseDragged(ByVal pvValue As Variant)
+ Call _PropertySet(&quot;OnMouseDragged&quot;, pvValue)
+End Property &apos; OnMouseDragged (set)
+
+REM -----------------------------------------------------------------------------------------------------------------------
+Property Get OnMouseEntered() As Variant
+ OnMouseEntered = _PropertyGet(&quot;OnMouseEntered&quot;)
+End Property &apos; OnMouseEntered (get)
+
+Property Let OnMouseEntered(ByVal pvValue As Variant)
+ Call _PropertySet(&quot;OnMouseEntered&quot;, pvValue)
+End Property &apos; OnMouseEntered (set)
+
+REM -----------------------------------------------------------------------------------------------------------------------
+Property Get OnMouseExited() As Variant
+ OnMouseExited = _PropertyGet(&quot;OnMouseExited&quot;)
+End Property &apos; OnMouseExited (get)
+
+Property Let OnMouseExited(ByVal pvValue As Variant)
+ Call _PropertySet(&quot;OnMouseExited&quot;, pvValue)
+End Property &apos; OnMouseExited (set)
+
+REM -----------------------------------------------------------------------------------------------------------------------
+Property Get OnMouseMoved() As Variant
+ OnMouseMoved = _PropertyGet(&quot;OnMouseMoved&quot;)
+End Property &apos; OnMouseMoved (get)
+
+Property Let OnMouseMoved(ByVal pvValue As Variant)
+ Call _PropertySet(&quot;OnMouseMoved&quot;, pvValue)
+End Property &apos; OnMouseMoved (set)
+
+REM -----------------------------------------------------------------------------------------------------------------------
+Property Get OnMousePressed() As Variant
+ OnMousePressed = _PropertyGet(&quot;OnMousePressed&quot;)
+End Property &apos; OnMousePressed (get)
+
+Property Let OnMousePressed(ByVal pvValue As Variant)
+ Call _PropertySet(&quot;OnMousePressed&quot;, pvValue)
+End Property &apos; OnMousePressed (set)
+
+REM -----------------------------------------------------------------------------------------------------------------------
+Property Get OnMouseReleased() As Variant
+ OnMouseReleased = _PropertyGet(&quot;OnMouseReleased&quot;)
+End Property &apos; OnMouseReleased (get)
+
+Property Let OnMouseReleased(ByVal pvValue As Variant)
+ Call _PropertySet(&quot;OnMouseReleased&quot;, pvValue)
+End Property &apos; OnMouseReleased (set)
+
+REM -----------------------------------------------------------------------------------------------------------------------
+Property Get OnResetted() As Variant
+ OnResetted = _PropertyGet(&quot;OnResetted&quot;)
+End Property &apos; OnResetted (get)
+
+Property Let OnResetted(ByVal pvValue As Variant)
+ Call _PropertySet(&quot;OnResetted&quot;, pvValue)
+End Property &apos; OnResetted (set)
+
+REM -----------------------------------------------------------------------------------------------------------------------
+Property Get OnTextChanged() As Variant
+ OnTextChanged = _PropertyGet(&quot;OnTextChanged&quot;)
+End Property &apos; OnTextChanged (get)
+
+Property Let OnTextChanged(ByVal pvValue As Variant)
+ Call _PropertySet(&quot;OnTextChanged&quot;, pvValue)
+End Property &apos; OnTextChanged (set)
+
+REM -----------------------------------------------------------------------------------------------------------------------
+Property Get OnUpdated() As Variant
+ OnUpdated = _PropertyGet(&quot;OnUpdated&quot;)
+End Property &apos; OnUpdated (get)
+
+Property Let OnUpdated(ByVal pvValue As Variant)
+ Call _PropertySet(&quot;OnUpdated&quot;, pvValue)
+End Property &apos; OnUpdated (set)
+
+REM -----------------------------------------------------------------------------------------------------------------------
Property Get OptionValue() As Variant
OptionValue = _PropertyGet(&quot;OptionValue&quot;)
End Property &apos; OptionValue (get)
@@ -557,8 +746,9 @@ REM ----------------------------------------------------------------------------
Public Function Controls(Optional ByVal pvIndex As Variant) As Variant
&apos; Return a Control object with name or index = pvIndex
+Const cstThisSub = &quot;Control.Controls&quot;
If _ErrorHandler() Then On Local Error Goto Error_Function
- Utils._SetCalledSub(&quot;Grid.Controls&quot;)
+ Utils._SetCalledSub(cstThisSub)
Dim ocControl As Variant, sParentShortcut As String, iControlCount As Integer
Dim oCounter As Variant, sControls() As Variant, i As Integer, bFound As Boolean, sIndex As String
@@ -609,13 +799,17 @@ Dim j As Integer, oView As Object
ocControl._FormComponent = ParentComponent
If Utils._hasUNOProperty(ocControl.ControlModel, &quot;ClassId&quot;) Then ocControl._ClassId = ocControl.ControlModel.ClassId
&apos; Complex bypass to find View of grid subcontrols !
- For i = 0 to ControlView.getCount() - 1
- Set oView = ControlView.GetByIndex(i)
- If oView.getModel.Name = ocControl._Name Then
- Set ocControl.ControlView = oView
- Exit For
- End If
- Next i
+ If Not IsNull(ControlView) Then &apos; Anticipate absence of ControlView in grid controls when edit mode
+ For i = 0 to ControlView.getCount() - 1
+ Set oView = ControlView.GetByIndex(i)
+ If Not IsNull(oView) Then
+ If oView.getModel.Name = ocControl._Name Then
+ Set ocControl.ControlView = oView
+ Exit For
+ End If
+ End If
+ Next i
+ End If
ocControl._Initialize()
ocControl._DocEntry = _DocEntry
@@ -623,7 +817,7 @@ Dim j As Integer, oView As Object
Set Controls = ocControl
Exit_Function:
- Utils._ResetCalledSub(&quot;Grid.Controls&quot;)
+ Utils._ResetCalledSub(cstThisSub)
Exit Function
Trace_Error_Index:
TraceError(TRACEFATAL, ERRCOLLECTION, Utils._CalledSub(), 0, 1)
@@ -638,7 +832,7 @@ Trace_Error_Context:
Set Controls = Nothing
Goto Exit_Function
Error_Function:
- TraceError(TRACEABORT, Err, &quot;Grid.Controls&quot;, Erl)
+ TraceError(TRACEABORT, Err, cstThisSub, Erl)
Set Controls = Nothing
GoTo Exit_Function
End Function &apos; Controls
@@ -787,6 +981,8 @@ Public Function setFocus() As Boolean
Dim i As Integer, j As Integer, iColPosition As Integer
Dim ocControl As Object, ocGrid As Variant, oGridModel As Object
+
+ If IsNull(ControlView) Then GoTo Exit_Function
If _ParentType = CTLPARENTISGRID Then &apos;setFocus method does not work on controlviews in grid ?!?
&apos; Find column position of control
iColPosition = -1
@@ -874,6 +1070,41 @@ Dim vFormats() As Variant
End Function &apos; _Formats V0.9.1
REM -----------------------------------------------------------------------------------------------------------------------
+Private Function _GetListener(ByVal psProperty As String) As String
+&apos; Return the X...Listener corresponding with the property in argument
+
+ Select Case UCase(psProperty)
+ Case UCase(&quot;OnActionPerformed&quot;)
+ _GetListener = &quot;XActionListener&quot;
+ Case UCase(&quot;OnAdjustmentValueChanged&quot;)
+ _GetListener = &quot;XAdjustmentListener&quot;
+ Case UCase(&quot;OnApproveAction&quot;)
+ _GetListener = &quot;XApproveActionListener&quot;
+ Case UCase(&quot;OnApproveReset&quot;), UCase(&quot;OnResetted&quot;)
+ _GetListener = &quot;XResetListener&quot;
+ Case UCase(&quot;OnApproveUpdate&quot;), UCase(&quot;OnUpdated&quot;)
+ _GetListener = &quot;XUpdateListener&quot;
+ Case UCase(&quot;OnChanged&quot;)
+ _GetListener = &quot;XChangeListener&quot;
+ Case UCase(&quot;OnErrorOccurred&quot;)
+ _GetListener = &quot;XErrorListener&quot;
+ Case UCase(&quot;OnFocusGained&quot;), UCase(&quot;OnFocusLost&quot;)
+ _GetListener = &quot;XFocusListener&quot;
+ Case UCase(&quot;OnItemStateChanged&quot;)
+ _GetListener = &quot;XItemListener&quot;
+ Case UCase(&quot;OnKeyPressed&quot;), UCase(&quot;OnKeyReleased&quot;)
+ _GetListener = &quot;XKeyListener&quot;
+ Case UCase(&quot;OnMouseDragged&quot;), UCase(&quot;OnMouseMoved&quot;)
+ _GetListener = &quot;XMouseMotionListener&quot;
+ Case UCase(&quot;OnMouseEntered&quot;), UCase(&quot;OnMouseExited&quot;), UCase(&quot;OnMousePressed&quot;), UCase(&quot;OnMouseReleased&quot;)
+ _GetListener = &quot;XMouseListener&quot;
+ Case UCase(&quot;OnTextChanged&quot;)
+ _GetListener = &quot;XTextListener&quot;
+ End Select
+
+End Function &apos; _GetListener V1.7.0
+
+REM -----------------------------------------------------------------------------------------------------------------------
Public Sub _Initialize()
&apos; Initialize new Control
&apos; ControlModel, ParentType, Name, Shortcut, ControlView, ImplementationName, ClassId (if parent &lt;&gt; dialog)
@@ -1024,6 +1255,27 @@ Dim vFullPropertiesList() As Variant
, &quot;MultiSelect&quot; _
, &quot;Name&quot; _
, &quot;ObjectType&quot; _
+ , &quot;OnActionPerformed&quot; _
+ , &quot;OnAdjustmentValueChanged&quot; _
+ , &quot;OnApproveAction&quot; _
+ , &quot;OnApproveReset&quot; _
+ , &quot;OnApproveUpdate&quot; _
+ , &quot;OnChanged&quot; _
+ , &quot;OnErrorOccurred&quot; _
+ , &quot;OnFocusGained&quot; _
+ , &quot;OnFocusLost&quot; _
+ , &quot;OnItemStateChanged&quot; _
+ , &quot;OnKeyPressed&quot; _
+ , &quot;OnKeyReleased&quot; _
+ , &quot;OnMouseDragged&quot; _
+ , &quot;OnMouseEntered&quot; _
+ , &quot;OnMouseExited&quot; _
+ , &quot;OnMouseMoved&quot; _
+ , &quot;OnMousePressed&quot; _
+ , &quot;OnMouseReleased&quot; _
+ , &quot;OnResetted&quot; _
+ , &quot;OnTextChanged&quot; _
+ , &quot;OnUpdated&quot; _
, &quot;OptionValue&quot; _
, &quot;Page&quot; _
, &quot;Parent&quot; _
@@ -1049,65 +1301,64 @@ Dim vFullPropertiesList() As Variant
Dim vPropertiesMatrix(25) As Variant
Select Case _ParentType
Case CTLPARENTISFORM, CTLPARENTISSUBFORM
- vPropertiesMatrix(acCheckBox) = Array(0,4,5,6,7,9,10,11,12,13,14,15,16,17,27,28,31,33,40,41,42,43,44,46,47,48,49)
- vPropertiesMatrix(acComboBox) = Array(0,1,2,5,6,7,9,10,11,12,13,14,15,16,17,20,23,24,25,27,28,31,33,34,35,41,42,43,44,45,46,48,49)
- vPropertiesMatrix(acCommandButton) = Array(0,3,4,6,7,8,10,11,12,13,14,15,16,17,27,28,31,41,42,43,44,46,48,49)
- vPropertiesMatrix(acCurrencyField) = Array(0,1,2,5,6,7,9,10,11,12,13,14,15,16,17,25,27,28,31,33,41,42,43,44,46,48,49)
- vPropertiesMatrix(acDateField) = Array(0,1,2,5,6,7,9,10,11,12,13,14,15,16,17,19,25,27,28,31,33,41,42,43,44,45,46,48,49)
- vPropertiesMatrix(acFileControl) = Array(0,1,2,6,7,9,10,11,12,13,14,15,16,17,25,27,28,31,41,42,43,44,45,48,49)
- vPropertiesMatrix(acFixedLine) = Array()
- vPropertiesMatrix(acFixedText) = Array(0,1,2,4,6,7,10,11,12,13,14,15,16,17,27,28,31,41,44,46,49)
- vPropertiesMatrix(acFormattedField) = Array(0,1,2,5,6,7,9,10,11,12,13,14,15,16,17,19,25,27,28,31,33,41,42,43,44,45,46,48,49)
- vPropertiesMatrix(acGridControl) = Array(0,1,2,6,7,10,11,12,13,14,15,16,17,27,28,31,41,42,43,44,49)
- vPropertiesMatrix(acGroupBox) = Array(4,6,7,10,11,12,13,14,15,16,17,27,28,31,41,44,49)
- vPropertiesMatrix(acHiddenControl) = Array(7,27,28,31,41,44,48,49)
- vPropertiesMatrix(acImageButton) = Array(0,1,2,6,7,10,27,28,31,32,41,42,43,44,49)
- vPropertiesMatrix(acImageControl) = Array(0,1,2,5,6,7,10,25,27,28,31,32,33,41,42,43,44,49)
- vPropertiesMatrix(acListBox) = Array(0,1,2,5,6,7,9,10,11,12,13,14,15,16,17,20,23,24,25,26,27,28,31,33,34,35,36,41,42,43,44,46,48,49)
- vPropertiesMatrix(acNavigationBar) = Array(0,2,6,7,10,11,12,13,14,15,16,17,27,28,31,41,42,43,44,49)
- vPropertiesMatrix(acNumericField) = Array(0,1,2,5,6,7,9,10,11,12,13,14,15,16,17,25,27,28,31,33,41,42,43,44,46,48,49)
- vPropertiesMatrix(acPatternField) = Array(0,1,2,5,6,7,9,10,11,12,13,14,15,16,17,25,27,28,31,33,37,38,39,41,42,43,44,45,46,48,49)
- vPropertiesMatrix(acProgressBar) = Array()
- vPropertiesMatrix(acRadioButton) = Array(0,4,5,6,7,9,10,11,12,13,14,15,16,17,27,28,29,31,33,40,41,42,43,44,46,48,49)
- vPropertiesMatrix(acScrollBar) = Array(0,1,2,6,7,10,27,28,31,41,42,43,44,48,49)
- vPropertiesMatrix(acSpinButton) = Array(0,1,2,6,7,9,10,27,28,31,41,42,43,44,48,49)
- vPropertiesMatrix(0) = Array(7,18,21,22,27,28,31,41)
- vPropertiesMatrix(acTextField) = Array(0,1,2,5,6,7,9,10,11,12,13,14,15,16,17,25,27,28,31,33,37,38,39,41,42,43,44,45,46,48,49)
- vPropertiesMatrix(acTimeField) = Array(0,1,2,5,6,7,9,10,11,12,13,14,15,16,17,19,25,27,28,31,33,41,42,43,44,45,46,48,49)
+ vPropertiesMatrix(acCheckBox) = Array(0,4,5,6,7,9,10,11,12,13,14,15,16,17,27,28,29,32,36,37,38,39,40,41,42,43,44,45,46,47,52,54,61,62,63,64,65,67,68,69,70)
+ vPropertiesMatrix(acComboBox) = Array(0,1,2,5,6,7,9,10,11,12,13,14,15,16,17,20,23,24,25,27,28,29,32,33,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,52,54,55,56,62,63,64,65,66,67,69,70)
+ vPropertiesMatrix(acCommandButton) = Array(0,3,4,6,7,8,10,11,12,13,14,15,16,17,27,28,29,31,32,36,37,38,39,40,41,42,43,44,45,46,47,52,53,62,63,64,65,67,69,70)
+ vPropertiesMatrix(acCurrencyField) = Array(0,1,2,5,6,7,9,10,11,12,13,14,15,16,17,25,27,28,32,33,36,37,39,40,41,42,43,44,45,46,47,48,49,52,54,62,63,64,65,67,69,70)
+ vPropertiesMatrix(acDateField) = Array(0,1,2,5,6,7,9,10,11,12,13,14,15,16,17,19,25,27,28,32,33,36,37,39,40,41,42,43,44,45,46,47,48,49,52,54,62,63,64,65,66,67,69,70)
+ vPropertiesMatrix(acFileControl) = Array(0,1,2,6,7,9,10,11,12,13,14,15,16,17,25,27,28,32,36,37,39,40,41,42,43,44,45,46,47,48,52,62,63,64,65,66,69,70)
+ vPropertiesMatrix(acFixedText) = Array(0,1,2,4,6,7,10,11,12,13,14,15,16,17,27,28,36,37,39,40,41,42,43,44,45,46,52,62,65,67,70)
+ vPropertiesMatrix(acFormattedField) = Array(0,1,2,5,6,7,9,10,11,12,13,14,15,16,17,19,25,27,28,32,33,35,36,37,39,40,41,42,43,44,45,46,47,48,49,52,54,62,63,64,65,66,67,69,70)
+ vPropertiesMatrix(acGridControl) = Array(0,1,2,6,7,10,11,12,13,14,15,16,17,27,28,32,33,35,36,37,39,40,41,42,43,44,45,46,47,49,52,62,63,64,65,70)
+ vPropertiesMatrix(acGroupBox) = Array(4,6,7,10,11,12,13,14,15,16,17,27,28,32,36,37,39,40,41,42,43,44,45,46,47,52,62,65,70)
+ vPropertiesMatrix(acHiddenControl) = Array(7,27,28,52,62,65,69,70)
+ vPropertiesMatrix(acImageButton) = Array(0,1,2,6,7,10,27,28,31,36,37,39,40,41,42,43,44,45,46,52,53,62,63,64,65,70)
+ vPropertiesMatrix(acImageControl) = Array(0,1,2,5,6,7,10,25,27,28,32,36,37,39,40,41,42,43,44,45,46,47,52,53,54,62,63,64,65,70)
+ vPropertiesMatrix(acListBox) = Array(0,1,2,5,6,7,9,10,11,12,13,14,15,16,17,20,23,24,25,26,27,28,29,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,49,52,54,55,56,57,62,63,64,65,67,69,70)
+ vPropertiesMatrix(acNavigationBar) = Array(0,2,6,7,10,11,12,13,14,15,16,17,27,28,36,37,39,40,41,42,43,44,45,46,52,62,63,64,65,70)
+ vPropertiesMatrix(acNumericField) = Array(0,1,2,5,6,7,9,10,11,12,13,14,15,16,17,25,27,28,32,33,36,37,39,40,41,42,43,44,45,46,47,48,49,52,54,62,63,64,65,67,69,70)
+ vPropertiesMatrix(acPatternField) = Array(0,1,2,5,6,7,9,10,11,12,13,14,15,16,17,25,27,28,32,33,36,37,39,40,41,42,43,44,45,46,47,48,49,52,54,58,59,60,62,63,64,65,66,67,69,70)
+ vPropertiesMatrix(acRadioButton) = Array(0,4,5,6,7,9,10,11,12,13,14,15,16,17,27,28,29,32,36,37,38,39,40,41,42,43,44,45,46,47,50,52,54,61,62,63,64,65,67,69,70)
+ vPropertiesMatrix(acScrollBar) = Array(0,1,2,6,7,10,27,28,30,32,33,36,37,39,40,41,42,43,44,45,46,47,49,52,62,63,64,65,69,70)
+ vPropertiesMatrix(acSpinButton) = Array(0,1,2,6,7,9,10,27,28,30,32,33,36,37,39,40,41,42,43,44,45,46,47,49,52,62,63,64,65,69,70)
+ vPropertiesMatrix(0) = Array(7,18,21,22,27,28,52,62)
+ vPropertiesMatrix(acTextField) = Array(0,1,2,5,6,7,9,10,11,12,13,14,15,16,17,25,27,28,32,33,34,36,37,39,40,41,42,43,44,45,46,47,48,49,52,54,58,59,60,62,63,64,65,66,67,69,70)
+ vPropertiesMatrix(acTimeField) = Array(0,1,2,5,6,7,9,10,11,12,13,14,15,16,17,19,25,27,28,32,33,36,37,39,40,41,42,43,44,45,46,47,48,49,52,54,62,63,64,65,66,67,69,70)
Case CTLPARENTISGROUP
&apos; To be duplicated from above !!!
- vPropertiesMatrix(acRadioButton) = Array(0,4,5,6,7,9,10,11,12,13,14,15,16,17,27,28,29,31,33,40,41,42,43,44,46,48,49)
+ vPropertiesMatrix(acRadioButton) = Array(0,4,5,6,7,9,10,11,12,13,14,15,16,17,27,28,29,32,36,37,38,39,40,41,42,43,44,45,46,47,50,52,54,61,62,63,64,65,67,69,70)
Case CTLPARENTISGRID
- vPropertiesMatrix(acCheckBox) = Array(4,5,6,7,9,10,27,28,31,33,40,41,44,46,47,48)
- vPropertiesMatrix(acComboBox) = Array(4,5,6,7,9,10,20,23,24,25,27,28,31,33,34,35,41,44,45,46,48)
- vPropertiesMatrix(acCurrencyField) = Array(4,5,6,7,9,10,25,27,28,31,33,41,44,46,48)
- vPropertiesMatrix(acDateField) = Array(4,5,6,7,9,10,19,25,27,28,31,33,41,44,45,46,48)
- vPropertiesMatrix(acFormattedField) = Array(4,5,6,7,9,10,19,25,27,28,31,33,41,44,45,46,48)
- vPropertiesMatrix(acListBox) = Array(4,5,6,7,9,10,20,23,24,25,26,27,28,31,33,34,35,36,41,44,46,48)
- vPropertiesMatrix(acNumericField) = Array(4,5,6,7,9,10,25,27,28,31,33,41,44,46,48)
- vPropertiesMatrix(acPatternField) = Array(4,5,6,7,9,10,25,27,28,31,33,37,38,39,41,44,45,46,48)
- vPropertiesMatrix(acTextField) = Array(4,5,6,7,9,10,25,27,28,31,33,37,38,39,41,44,45,46,48)
- vPropertiesMatrix(acTimeField) = Array(4,5,6,7,9,10,19,25,27,28,31,33,41,44,45,46,48)
+ vPropertiesMatrix(acCheckBox) = Array(4,5,6,7,9,10,27,28,29,32,36,37,38,39,40,41,42,43,44,45,46,47,52,54,61,62,65,67,68,69)
+ vPropertiesMatrix(acComboBox) = Array(4,5,6,7,9,10,20,23,24,25,27,28,32,33,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,52,54,55,56,62,65,66,67,69)
+ vPropertiesMatrix(acCurrencyField) = Array(4,5,6,7,9,10,25,27,28,32,33,36,37,39,40,41,42,43,44,45,46,47,48,49,52,54,62,65,67,69)
+ vPropertiesMatrix(acDateField) = Array(4,5,6,7,9,10,19,25,27,28,32,33,36,37,39,40,41,42,43,44,45,46,47,48,49,52,54,62,65,66,67,69)
+ vPropertiesMatrix(acFormattedField) = Array(4,5,6,7,9,10,19,25,27,28,32,33,35,36,37,39,40,41,42,43,44,45,46,47,48,49,52,54,62,65,66,67,69)
+ vPropertiesMatrix(acListBox) = Array(4,5,6,7,9,10,20,23,24,25,26,27,28,32,33,35,36,37,38,39,40,41,42,43,44,45,46,47,49,52,54,55,56,57,62,65,67,69)
+ vPropertiesMatrix(acNumericField) = Array(4,5,6,7,9,10,25,27,28,32,33,36,37,39,40,41,42,43,44,45,46,47,48,49,52,54,62,65,67,69)
+ vPropertiesMatrix(acPatternField) = Array(4,5,6,7,9,10,25,27,28,32,33,36,37,39,40,41,42,43,44,45,46,47,48,49,52,54,58,59,60,62,65,66,67,69)
+ vPropertiesMatrix(acTextField) = Array(4,5,6,7,9,10,25,27,28,32,33,34,36,37,39,40,41,42,43,44,45,46,47,48,49,52,54,58,59,60,62,65,66,67,69)
+ vPropertiesMatrix(acTimeField) = Array(4,5,6,7,9,10,19,25,27,28,32,33,36,37,39,40,41,42,43,44,45,46,47,48,49,52,54,62,65,66,67,69)
Case CTLPARENTISDIALOG
- vPropertiesMatrix(acCheckBox) = Array(0,4,6,7,10,11,12,13,14,15,16,17,27,28,30,31,40,41,42,43,44,46,47,48,49)
- vPropertiesMatrix(acComboBox) = Array(0,1,2,6,7,10,11,12,13,14,15,16,17,20,23,24,25,27,28,30,31,34,41,42,43,44,45,46,48,49)
- vPropertiesMatrix(acCommandButton) = Array(0,3,4,6,7,8,10,11,12,13,14,15,16,17,27,28,30,31,41,42,43,44,46,49)
- vPropertiesMatrix(acCurrencyField) = Array(0,1,2,6,7,10,11,12,13,14,15,16,17,25,27,28,30,31,41,42,43,44,46,48,49)
- vPropertiesMatrix(acDateField) = Array(0,1,2,6,7,10,11,12,13,14,15,16,17,19,25,27,28,30,31,41,42,43,44,45,46,48,49)
- vPropertiesMatrix(acFileControl) = Array(0,1,2,6,7,10,11,12,13,14,15,16,17,25,27,28,30,31,41,42,43,44,45,46,48,49)
- vPropertiesMatrix(acFixedLine) = Array(0,4,6,7,10,11,12,13,14,15,16,17,27,28,30,31,41,42,44,49)
- vPropertiesMatrix(acFixedText) = Array(0,1,2,4,6,7,10,11,12,13,14,15,16,17,27,28,30,31,41,42,43,44,46,49)
- vPropertiesMatrix(acFormattedField) = Array(0,1,2,6,7,10,11,12,13,14,15,16,17,19,25,27,28,30,31,41,42,43,44,45,46,48,49)
- vPropertiesMatrix(acGroupBox) = Array(4,6,7,10,11,12,13,14,15,16,17,27,28,30,31,41,42,44,49)
- vPropertiesMatrix(acImageControl) = Array(0,1,2,6,7,10,27,28,30,31,41,42,43,44,49)
- vPropertiesMatrix(acListBox) = Array(0,1,2,6,7,10,11,12,13,14,15,16,17,20,23,24,25,26,27,28,30,31,34,36,41,42,43,44,46,48,49)
- vPropertiesMatrix(acNumericField) = Array(0,1,2,6,7,10,11,12,13,14,15,16,17,25,27,28,30,31,41,42,43,44,46,48,49)
- vPropertiesMatrix(acPatternField) = Array(0,1,2,6,7,10,11,12,13,14,15,16,17,25,27,28,30,31,37,38,39,41,42,43,44,45,46,48,49)
- vPropertiesMatrix(acProgressBar) = Array(0,1,2,6,7,10,27,28,30,31,41,42,44,48,49)
- vPropertiesMatrix(acRadioButton) = Array(0,4,6,7,10,11,12,13,14,15,16,17,27,28,29,30,31,40,41,42,43,44,46,48,49)
- vPropertiesMatrix(acScrollBar) = Array(0,1,2,6,7,10,27,28,30,31,41,42,43,44,48,49)
- vPropertiesMatrix(acTextField) = Array(0,1,2,6,7,10,11,12,13,14,15,16,17,25,27,28,30,31,37,38,39,41,42,43,44,45,46,48,49)
- vPropertiesMatrix(acTimeField) = Array(0,1,2,6,7,10,11,12,13,14,15,16,17,19,25,27,28,30,31,41,42,43,44,45,46,48,49)
+ vPropertiesMatrix(acCheckBox) = Array(0,4,6,7,10,11,12,13,14,15,16,17,27,28,29,36,37,38,39,40,41,42,43,44,45,46,51,52,61,62,63,64,65,67,68,69,70)
+ vPropertiesMatrix(acComboBox) = Array(0,1,2,6,7,10,11,12,13,14,15,16,17,20,23,24,25,27,28,29,36,37,38,39,40,41,42,43,44,45,46,48,51,52,55,62,63,64,65,66,67,69,70)
+ vPropertiesMatrix(acCommandButton) = Array(0,3,4,6,7,8,10,11,12,13,14,15,16,17,27,28,29,36,37,38,39,40,41,42,43,44,45,46,51,52,53,62,63,64,65,67,70)
+ vPropertiesMatrix(acCurrencyField) = Array(0,1,2,6,7,10,11,12,13,14,15,16,17,25,27,28,36,37,39,40,41,42,43,44,45,46,48,51,52,62,63,64,65,67,69,70)
+ vPropertiesMatrix(acDateField) = Array(0,1,2,6,7,10,11,12,13,14,15,16,17,19,25,27,28,36,37,39,40,41,42,43,44,45,46,48,51,52,62,63,64,65,66,67,69,70)
+ vPropertiesMatrix(acFileControl) = Array(0,1,2,6,7,10,11,12,13,14,15,16,17,25,27,28,36,37,39,40,41,42,43,44,45,46,48,51,52,62,63,64,65,66,67,69,70)
+ vPropertiesMatrix(acFixedLine) = Array(0,4,6,7,10,11,12,13,14,15,16,17,27,28,36,37,39,40,41,42,43,44,45,46,51,52,62,63,65,70)
+ vPropertiesMatrix(acFixedText) = Array(0,1,2,4,6,7,10,11,12,13,14,15,16,17,27,28,36,37,39,40,41,42,43,44,45,46,51,52,62,63,64,65,67,70)
+ vPropertiesMatrix(acFormattedField) = Array(0,1,2,6,7,10,11,12,13,14,15,16,17,19,25,27,28,36,37,39,40,41,42,43,44,45,46,48,51,52,62,63,64,65,66,67,69,70)
+ vPropertiesMatrix(acGroupBox) = Array(4,6,7,10,11,12,13,14,15,16,17,27,28,36,37,39,40,41,42,43,44,45,46,51,52,62,63,65,70)
+ vPropertiesMatrix(acImageControl) = Array(0,1,2,6,7,10,27,28,36,37,39,40,41,42,43,44,45,46,51,52,53,62,63,64,65,70)
+ vPropertiesMatrix(acListBox) = Array(0,1,2,6,7,10,11,12,13,14,15,16,17,20,23,24,25,26,27,28,29,36,37,38,39,40,41,42,43,44,45,46,51,52,55,57,62,63,64,65,67,69,70)
+ vPropertiesMatrix(acNavigationBar) = Array(36,37,39,40,41,42,43,44,45,46)
+ vPropertiesMatrix(acNumericField) = Array(0,1,2,6,7,10,11,12,13,14,15,16,17,25,27,28,36,37,39,40,41,42,43,44,45,46,48,51,52,62,63,64,65,67,69,70)
+ vPropertiesMatrix(acPatternField) = Array(0,1,2,6,7,10,11,12,13,14,15,16,17,25,27,28,36,37,39,40,41,42,43,44,45,46,48,51,52,58,59,60,62,63,64,65,66,67,69,70)
+ vPropertiesMatrix(acProgressBar) = Array(0,1,2,6,7,10,27,28,36,37,39,40,41,42,43,44,45,46,51,52,62,63,65,69,70)
+ vPropertiesMatrix(acRadioButton) = Array(0,4,6,7,10,11,12,13,14,15,16,17,27,28,29,36,37,38,39,40,41,42,43,44,45,46,50,51,52,61,62,63,64,65,67,69,70)
+ vPropertiesMatrix(acScrollBar) = Array(0,1,2,6,7,10,27,28,30,36,37,39,40,41,42,43,44,45,46,51,52,62,63,64,65,69,70)
+ vPropertiesMatrix(acTextField) = Array(0,1,2,6,7,10,11,12,13,14,15,16,17,25,27,28,36,37,39,40,41,42,43,44,45,46,48,51,52,58,59,60,62,63,64,65,66,67,69,70)
+ vPropertiesMatrix(acTimeField) = Array(0,1,2,6,7,10,11,12,13,14,15,16,17,19,25,27,28,36,37,39,40,41,42,43,44,45,46,48,51,52,62,63,64,65,66,67,69,70)
End Select
Dim vProperties() As Variant, i As Integer, iIndex As Integer
@@ -1332,6 +1583,13 @@ Dim vSelection As Variant, sSelectedText As String
End If
Case UCase(&quot;Name&quot;)
_PropertyGet = _Name
+ Case UCase(&quot;OnActionPerformed&quot;), UCase(&quot;OnAdjustmentValueChanged&quot;), UCase(&quot;OnApproveAction&quot;), UCase(&quot;OnApproveReset&quot;) _
+ , UCase(&quot;OnApproveUpdate&quot;), UCase(&quot;OnChanged&quot;), UCase(&quot;OnErrorOccurred&quot;), UCase(&quot;OnFocusGained&quot;) _
+ , UCase(&quot;OnFocusLost&quot;), UCase(&quot;OnItemStateChanged&quot;), UCase(&quot;OnKeyPressed&quot;), UCase(&quot;OnKeyReleased&quot;) _
+ , UCase(&quot;OnMouseDragged&quot;), UCase(&quot;OnMouseEntered&quot;), UCase(&quot;OnMouseExited&quot;), UCase(&quot;OnMouseMoved&quot;) _
+ , UCase(&quot;OnMousePressed&quot;), UCase(&quot;OnMouseReleased&quot;), UCase(&quot;OnResetted&quot;), UCase(&quot;OnTextChanged&quot;) _
+ , UCase(&quot;OnUpdated&quot;)
+ _PropertyGet = Utils._GetEventScriptCode(ControlModel, psProperty, _Name)
Case UCase(&quot;OptionValue&quot;)
If Utils._hasUNOProperty(ControlModel, &quot;RefValue&quot;) Then
If ControlModel.RefValue &lt;&gt; &quot;&quot; Then
@@ -1815,6 +2073,18 @@ Dim vSelection As Variant, sText As String, lStart As long
ControlModel.MultiSelectionSimpleMode = pvValue
End If
If Not pvValue Then ControlModel.SelectedItems = Array() &apos; Cancel selections when MultiSelect becomes False
+ Case UCase(&quot;OnActionPerformed&quot;), UCase(&quot;OnAdjustmentValueChanged&quot;), UCase(&quot;OnApproveAction&quot;), UCase(&quot;OnApproveReset&quot;) _
+ , UCase(&quot;OnApproveUpdate&quot;), UCase(&quot;OnChanged&quot;), UCase(&quot;OnErrorOccurred&quot;), UCase(&quot;OnFocusGained&quot;) _
+ , UCase(&quot;OnFocusLost&quot;), UCase(&quot;OnItemStateChanged&quot;), UCase(&quot;OnKeyPressed&quot;), UCase(&quot;OnKeyReleased&quot;) _
+ , UCase(&quot;OnMouseDragged&quot;), UCase(&quot;OnMouseEntered&quot;), UCase(&quot;OnMouseExited&quot;), UCase(&quot;OnMouseMoved&quot;) _
+ , UCase(&quot;OnMousePressed&quot;), UCase(&quot;OnMouseReleased&quot;), UCase(&quot;OnResetted&quot;), UCase(&quot;OnTextChanged&quot;) _
+ , UCase(&quot;OnUpdated&quot;)
+ If Not Utils._CheckArgument(pvValue, iArgNr, vbString, , False) Then Goto Trace_Error_Value
+ If Not Utils._RegisterEventScript(ControlModel _
+ , psProperty _
+ , _GetListener(psProperty) _
+ , pvValue, _Name _
+ ) Then GoTo Trace_Error
Case UCase(&quot;OptionValue&quot;)
If Not Utils._hasUNOProperty(ControlModel, &quot;RefValue&quot;) Then Goto Trace_Error
If Not Utils._CheckArgument(pvValue, iArgNr, vbString, , False) Then Goto Trace_Error_Value
diff --git a/wizards/source/access2base/Form.xba b/wizards/source/access2base/Form.xba
index bf0ab31d87f0..f890214929e0 100644
--- a/wizards/source/access2base/Form.xba
+++ b/wizards/source/access2base/Form.xba
@@ -210,6 +210,141 @@ Property Get ObjectType() As String
End Property &apos; ObjectType (get)
REM -----------------------------------------------------------------------------------------------------------------------
+Property Get OnApproveCursorMove() As Variant
+ OnApproveCursorMove = _PropertyGet(&quot;OnApproveCursorMove&quot;)
+End Property &apos; OnApproveCursorMove (get)
+
+Property Let OnApproveCursorMove(ByVal pvValue As Variant)
+ Call _PropertySet(&quot;OnApproveCursorMove&quot;, pvValue)
+End Property &apos; OnApproveCursorMove (set)
+
+REM -----------------------------------------------------------------------------------------------------------------------
+Property Get OnApproveParameter() As Variant
+ OnApproveParameter = _PropertyGet(&quot;OnApproveParameter&quot;)
+End Property &apos; OnApproveParameter (get)
+
+Property Let OnApproveParameter(ByVal pvValue As Variant)
+ Call _PropertySet(&quot;OnApproveParameter&quot;, pvValue)
+End Property &apos; OnApproveParameter (set)
+
+REM -----------------------------------------------------------------------------------------------------------------------
+Property Get OnApproveReset() As Variant
+ OnApproveReset = _PropertyGet(&quot;OnApproveReset&quot;)
+End Property &apos; OnApproveReset (get)
+
+Property Let OnApproveReset(ByVal pvValue As Variant)
+ Call _PropertySet(&quot;OnApproveReset&quot;, pvValue)
+End Property &apos; OnApproveReset (set)
+
+REM -----------------------------------------------------------------------------------------------------------------------
+Property Get OnApproveRowChange() As Variant
+ OnApproveRowChange = _PropertyGet(&quot;OnApproveRowChange&quot;)
+End Property &apos; OnApproveRowChange (get)
+
+Property Let OnApproveRowChange(ByVal pvValue As Variant)
+ Call _PropertySet(&quot;OnApproveRowChange&quot;, pvValue)
+End Property &apos; OnApproveRowChange (set)
+
+REM -----------------------------------------------------------------------------------------------------------------------
+Property Get OnApproveSubmit() As Variant
+ OnApproveSubmit = _PropertyGet(&quot;OnApproveSubmit&quot;)
+End Property &apos; OnApproveSubmit (get)
+
+Property Let OnApproveSubmit(ByVal pvValue As Variant)
+ Call _PropertySet(&quot;OnApproveSubmit&quot;, pvValue)
+End Property &apos; OnApproveSubmit (set)
+
+REM -----------------------------------------------------------------------------------------------------------------------
+Property Get OnConfirmDelete() As Variant
+ OnConfirmDelete = _PropertyGet(&quot;OnConfirmDelete&quot;)
+End Property &apos; OnConfirmDelete (get)
+
+Property Let OnConfirmDelete(ByVal pvValue As Variant)
+ Call _PropertySet(&quot;OnConfirmDelete&quot;, pvValue)
+End Property &apos; OnConfirmDelete (set)
+
+REM -----------------------------------------------------------------------------------------------------------------------
+Property Get OnCursorMoved() As Variant
+ OnCursorMoved = _PropertyGet(&quot;OnCursorMoved&quot;)
+End Property &apos; OnCursorMoved (get)
+
+Property Let OnCursorMoved(ByVal pvValue As Variant)
+ Call _PropertySet(&quot;OnCursorMoved&quot;, pvValue)
+End Property &apos; OnCursorMoved (set)
+
+REM -----------------------------------------------------------------------------------------------------------------------
+Property Get OnErrorOccurred() As Variant
+ OnErrorOccurred = _PropertyGet(&quot;OnErrorOccurred&quot;)
+End Property &apos; OnErrorOccurred (get)
+
+Property Let OnErrorOccurred(ByVal pvValue As Variant)
+ Call _PropertySet(&quot;OnErrorOccurred&quot;, pvValue)
+End Property &apos; OnErrorOccurred (set)
+
+REM -----------------------------------------------------------------------------------------------------------------------
+Property Get OnLoaded() As Variant
+ OnLoaded = _PropertyGet(&quot;OnLoaded&quot;)
+End Property &apos; OnLoaded (get)
+
+Property Let OnLoaded(ByVal pvValue As Variant)
+ Call _PropertySet(&quot;OnLoaded&quot;, pvValue)
+End Property &apos; OnLoaded (set)
+
+REM -----------------------------------------------------------------------------------------------------------------------
+Property Get OnReloaded() As Variant
+ OnReloaded = _PropertyGet(&quot;OnReloaded&quot;)
+End Property &apos; OnReloaded (get)
+
+Property Let OnReloaded(ByVal pvValue As Variant)
+ Call _PropertySet(&quot;OnReloaded&quot;, pvValue)
+End Property &apos; OnReloaded (set)
+
+REM -----------------------------------------------------------------------------------------------------------------------
+Property Get OnReloading() As Variant
+ OnReloading = _PropertyGet(&quot;OnReloading&quot;)
+End Property &apos; OnReloading (get)
+
+Property Let OnReloading(ByVal pvValue As Variant)
+ Call _PropertySet(&quot;OnReloading&quot;, pvValue)
+End Property &apos; OnReloading (set)
+
+REM -----------------------------------------------------------------------------------------------------------------------
+Property Get OnResetted() As Variant
+ OnResetted = _PropertyGet(&quot;OnResetted&quot;)
+End Property &apos; OnResetted (get)
+
+Property Let OnResetted(ByVal pvValue As Variant)
+ Call _PropertySet(&quot;OnResetted&quot;, pvValue)
+End Property &apos; OnResetted (set)
+
+REM -----------------------------------------------------------------------------------------------------------------------
+Property Get OnRowChanged() As Variant
+ OnRowChanged = _PropertyGet(&quot;OnRowChanged&quot;)
+End Property &apos; OnRowChanged (get)
+
+Property Let OnRowChanged(ByVal pvValue As Variant)
+ Call _PropertySet(&quot;OnRowChanged&quot;, pvValue)
+End Property &apos; OnRowChanged (set)
+
+REM -----------------------------------------------------------------------------------------------------------------------
+Property Get OnUnloaded() As Variant
+ OnUnloaded = _PropertyGet(&quot;OnUnloaded&quot;)
+End Property &apos; OnUnloaded (get)
+
+Property Let OnUnloaded(ByVal pvValue As Variant)
+ Call _PropertySet(&quot;OnUnloaded&quot;, pvValue)
+End Property &apos; OnUnloaded (set)
+
+REM -----------------------------------------------------------------------------------------------------------------------
+Property Get OnUnloading() As Variant
+ OnUnloading = _PropertyGet(&quot;OnUnloading&quot;)
+End Property &apos; OnUnloading (get)
+
+Property Let OnUnloading(ByVal pvValue As Variant)
+ Call _PropertySet(&quot;OnUnloading&quot;, pvValue)
+End Property &apos; OnUnloading (set)
+
+REM -----------------------------------------------------------------------------------------------------------------------
Property Get OpenArgs() As Variant
OpenArgs = _PropertyGet(&quot;OpenArgs&quot;)
End Property &apos; OpenArgs (get)
@@ -600,6 +735,34 @@ End Function
REM -----------------------------------------------------------------------------------------------------------------------
REM --- PRIVATE FUNCTIONS ---
REM -----------------------------------------------------------------------------------------------------------------------
+
+Private Function _GetListener(ByVal psProperty As String) As String
+&apos; Return the X...Listener corresponding with the property in argument
+
+ Select Case UCase(psProperty)
+ Case UCase(&quot;OnApproveCursorMove&quot;)
+ _GetListener = &quot;XRowSetApproveListener&quot;
+ Case UCase(&quot;OnApproveParameter&quot;)
+ _GetListener = &quot;XDatabaseParameterListener&quot;
+ Case UCase(&quot;OnApproveReset&quot;), UCase(&quot;OnResetted&quot;)
+ _GetListener = &quot;XResetListener&quot;
+ Case UCase(&quot;OnApproveRowChange&quot;)
+ _GetListener = &quot;XRowSetApproveListener&quot;
+ Case UCase(&quot;OnApproveSubmit&quot;)
+ _GetListener = &quot;XSubmitListener&quot;
+ Case UCase(&quot;OnConfirmDelete&quot;)
+ _GetListener = &quot;XConfirmDeleteListener&quot;
+ Case UCase(&quot;OnCursorMoved&quot;), UCase(&quot;OnRowChanged&quot;)
+ _GetListener = &quot;XRowSetListener&quot;
+ Case UCase(&quot;OnErrorOccurred&quot;)
+ _GetListener = &quot;XSQLErrorListener&quot;
+ Case UCase(&quot;OnLoaded&quot;), UCase(&quot;OnReloaded&quot;), UCase(&quot;OnReloading&quot;), UCase(&quot;OnUnloaded&quot;), UCase(&quot;OnUnloading&quot;)
+ _GetListener = &quot;XLoadListener&quot;
+ End Select
+
+End Function &apos; _GetListener V1.7.0
+
+REM -----------------------------------------------------------------------------------------------------------------------
Public Sub _Initialize(psName As String)
&apos; Set pointers to UNO objects
@@ -661,8 +824,11 @@ Private Function _PropertiesList() As Variant
If IsLoaded Then
_PropertiesList = Array(&quot;AllowAdditions&quot;, &quot;AllowDeletions&quot;, &quot;AllowEdits&quot;, &quot;Bookmark&quot; _
, &quot;Caption&quot;, &quot;CurrentRecord&quot;, &quot;Filter&quot;, &quot;FilterOn&quot;, &quot;Height&quot;, &quot;IsLoaded&quot; _
- , &quot;Name&quot;, &quot;ObjectType&quot;, &quot;OpenArgs&quot;, &quot;OrderBy&quot;, &quot;OrderByOn&quot; _
- , &quot;RecordSource&quot;, &quot;Visible&quot;, &quot;Width&quot; _
+ , &quot;Name&quot;, &quot;ObjectType&quot;, &quot;OnApproveCursorMove&quot;, &quot;OnApproveParameter&quot; _
+ , &quot;OnApproveReset&quot;, &quot;OnApproveRowChange&quot;, &quot;OnApproveSubmit&quot;, &quot;OnConfirmDelete&quot; _
+ , &quot;OnCursorMoved&quot;, &quot;OnErrorOccurred&quot;, &quot;OnLoaded&quot;, &quot;OnReloaded&quot;, &quot;OnReloading&quot; _
+ , &quot;OnResetted&quot;, &quot;OnRowChanged&quot;, &quot;OnUnloaded&quot;, &quot;OnUnloading&quot;, &quot;OpenArgs&quot; _
+ , &quot;OrderBy&quot;, &quot;OrderByOn&quot;, &quot;RecordSource&quot;, &quot;Visible&quot;, &quot;Width&quot; _
) &apos; Recordset removed
Else
_PropertiesList = Array(&quot;IsLoaded&quot;, &quot;Name&quot; _
@@ -680,13 +846,15 @@ Private Function _PropertyGet(ByVal psProperty As String) As Variant
&apos;Execute
Dim oDatabase As Object, vBookmark As Variant, vEMPTY As Variant
-Dim oObject As Object
+Dim i As Integer, oObject As Object
+
_PropertyGet = vEMPTY
Select Case UCase(psProperty)
Case UCase(&quot;Name&quot;), UCase(&quot;IsLoaded&quot;)
Case Else : If Not IsLoaded Then Goto Trace_Error_Form
End Select
+
Select Case UCase(psProperty)
Case UCase(&quot;AllowAdditions&quot;)
_PropertyGet = DatabaseForm.AllowInserts
@@ -720,6 +888,11 @@ Dim oObject As Object
_PropertyGet = _Name
Case UCase(&quot;ObjectType&quot;)
_PropertyGet = _Type
+ Case UCase(&quot;OnApproveCursorMove&quot;), UCase(&quot;OnApproveParameter&quot;), UCase(&quot;OnApproveReset&quot;), UCase(&quot;OnApproveRowChange&quot;) _
+ , UCase(&quot;OnApproveSubmit&quot;), UCase(&quot;OnConfirmDelete&quot;), UCase(&quot;OnCursorMoved&quot;), UCase(&quot;OnErrorOccurred&quot;) _
+ , UCase(&quot;OnLoaded&quot;), UCase(&quot;OnReloaded&quot;), UCase(&quot;OnReloading&quot;), UCase(&quot;OnResetted&quot;), UCase(&quot;OnRowChanged&quot;) _
+ , UCase(&quot;OnUnloaded&quot;), UCase(&quot;OnUnloading&quot;)
+ _PropertyGet = Utils._GetEventScriptCode(DatabaseForm, psProperty, _Name, True)
Case UCase(&quot;OpenArgs&quot;)
_PropertyGet = _OpenArgs
Case UCase(&quot;OrderBy&quot;)
@@ -784,11 +957,12 @@ Private Function _PropertySet(ByVal psProperty As String, ByVal pvValue As Varia
_PropertySet = True
&apos;Execute
-Dim iArgNr As Integer
+Dim iArgNr As Integer, i As Integer
Dim oDatabase As Object
If _Isleft(_A2B_.CalledSub, &quot;Form.&quot;) Then iArgNr = 1 Else iArgNr = 2
If Not IsLoaded Then Goto Trace_Error_Form
+
Select Case UCase(psProperty)
Case UCase(&quot;AllowAdditions&quot;)
If Not Utils._CheckArgument(pvValue, iArgNr, vbBoolean, , False) Then Goto Trace_Error_Value
@@ -831,6 +1005,16 @@ Dim oDatabase As Object
ContainerWindow.IsMinimized = False
End If
ContainerWindow.setPosSize(0, 0, 0, pvValue, com.sun.star.awt.PosSize.HEIGHT)
+ Case UCase(&quot;OnApproveCursorMove&quot;), UCase(&quot;OnApproveParameter&quot;), UCase(&quot;OnApproveReset&quot;), UCase(&quot;OnApproveRowChange&quot;) _
+ , UCase(&quot;OnApproveSubmit&quot;), UCase(&quot;OnConfirmDelete&quot;), UCase(&quot;OnCursorMoved&quot;), UCase(&quot;OnErrorOccurred&quot;) _
+ , UCase(&quot;OnLoaded&quot;), UCase(&quot;OnReloaded&quot;), UCase(&quot;OnReloading&quot;), UCase(&quot;OnResetted&quot;), UCase(&quot;OnRowChanged&quot;) _
+ , UCase(&quot;OnUnloaded&quot;), UCase(&quot;OnUnloading&quot;)
+ If Not Utils._CheckArgument(pvValue, iArgNr, vbString, , False) Then Goto Trace_Error_Value
+ If Not Utils._RegisterEventScript(DatabaseForm _
+ , psProperty _
+ , _GetListener(psProperty) _
+ , pvValue, _Name, True _
+ ) Then GoTo Trace_Error
Case UCase(&quot;OrderBy&quot;)
If Not Utils._CheckArgument(pvValue, iArgNr, vbString, , False) Then Goto Trace_Error_Value
_OrderBy = Application._CurrentDb(_DocEntry, _DbEntry)._ReplaceSquareBrackets(pvValue)
diff --git a/wizards/source/access2base/Root_.xba b/wizards/source/access2base/Root_.xba
index 4351d623cc56..3aceacddcc87 100644
--- a/wizards/source/access2base/Root_.xba
+++ b/wizards/source/access2base/Root_.xba
@@ -25,6 +25,7 @@ Private TraceLogCount As Integer
Private TraceLogLast As Integer
Private TraceLogMaxEntries As Integer
Private CalledSub As String
+Private DebugPrintShort As Boolean
Private Introspection As Object &apos; com.sun.star.beans.Introspection
Private VersionNumber As String &apos; Actual Access2Base version number
Private Locale As String
@@ -47,6 +48,7 @@ Dim vCurrentDoc() As Variant
TraceLogLast = 0
TraceLogMaxEntries = 0
CalledSub = &quot;&quot;
+ DebugPrintShort = True
Locale = L10N._GetLocale()
Set Introspection = CreateUnoService(&quot;com.sun.star.beans.Introspection&quot;)
Set FindRecord = Nothing
diff --git a/wizards/source/access2base/SubForm.xba b/wizards/source/access2base/SubForm.xba
index 98af11131c2f..832e8c12fc7e 100644
--- a/wizards/source/access2base/SubForm.xba
+++ b/wizards/source/access2base/SubForm.xba
@@ -124,6 +124,141 @@ Public Function pName() As String &apos; For compatibility with &lt; V0.9.0
End Function &apos; pName (get)
REM -----------------------------------------------------------------------------------------------------------------------
+Property Get OnApproveCursorMove() As Variant
+ OnApproveCursorMove = _PropertyGet(&quot;OnApproveCursorMove&quot;)
+End Property &apos; OnApproveCursorMove (get)
+
+Property Let OnApproveCursorMove(ByVal pvValue As Variant)
+ Call _PropertySet(&quot;OnApproveCursorMove&quot;, pvValue)
+End Property &apos; OnApproveCursorMove (set)
+
+REM -----------------------------------------------------------------------------------------------------------------------
+Property Get OnApproveParameter() As Variant
+ OnApproveParameter = _PropertyGet(&quot;OnApproveParameter&quot;)
+End Property &apos; OnApproveParameter (get)
+
+Property Let OnApproveParameter(ByVal pvValue As Variant)
+ Call _PropertySet(&quot;OnApproveParameter&quot;, pvValue)
+End Property &apos; OnApproveParameter (set)
+
+REM -----------------------------------------------------------------------------------------------------------------------
+Property Get OnApproveReset() As Variant
+ OnApproveReset = _PropertyGet(&quot;OnApproveReset&quot;)
+End Property &apos; OnApproveReset (get)
+
+Property Let OnApproveReset(ByVal pvValue As Variant)
+ Call _PropertySet(&quot;OnApproveReset&quot;, pvValue)
+End Property &apos; OnApproveReset (set)
+
+REM -----------------------------------------------------------------------------------------------------------------------
+Property Get OnApproveRowChange() As Variant
+ OnApproveRowChange = _PropertyGet(&quot;OnApproveRowChange&quot;)
+End Property &apos; OnApproveRowChange (get)
+
+Property Let OnApproveRowChange(ByVal pvValue As Variant)
+ Call _PropertySet(&quot;OnApproveRowChange&quot;, pvValue)
+End Property &apos; OnApproveRowChange (set)
+
+REM -----------------------------------------------------------------------------------------------------------------------
+Property Get OnApproveSubmit() As Variant
+ OnApproveSubmit = _PropertyGet(&quot;OnApproveSubmit&quot;)
+End Property &apos; OnApproveSubmit (get)
+
+Property Let OnApproveSubmit(ByVal pvValue As Variant)
+ Call _PropertySet(&quot;OnApproveSubmit&quot;, pvValue)
+End Property &apos; OnApproveSubmit (set)
+
+REM -----------------------------------------------------------------------------------------------------------------------
+Property Get OnConfirmDelete() As Variant
+ OnConfirmDelete = _PropertyGet(&quot;OnConfirmDelete&quot;)
+End Property &apos; OnConfirmDelete (get)
+
+Property Let OnConfirmDelete(ByVal pvValue As Variant)
+ Call _PropertySet(&quot;OnConfirmDelete&quot;, pvValue)
+End Property &apos; OnConfirmDelete (set)
+
+REM -----------------------------------------------------------------------------------------------------------------------
+Property Get OnCursorMoved() As Variant
+ OnCursorMoved = _PropertyGet(&quot;OnCursorMoved&quot;)
+End Property &apos; OnCursorMoved (get)
+
+Property Let OnCursorMoved(ByVal pvValue As Variant)
+ Call _PropertySet(&quot;OnCursorMoved&quot;, pvValue)
+End Property &apos; OnCursorMoved (set)
+
+REM -----------------------------------------------------------------------------------------------------------------------
+Property Get OnErrorOccurred() As Variant
+ OnErrorOccurred = _PropertyGet(&quot;OnErrorOccurred&quot;)
+End Property &apos; OnErrorOccurred (get)
+
+Property Let OnErrorOccurred(ByVal pvValue As Variant)
+ Call _PropertySet(&quot;OnErrorOccurred&quot;, pvValue)
+End Property &apos; OnErrorOccurred (set)
+
+REM -----------------------------------------------------------------------------------------------------------------------
+Property Get OnLoaded() As Variant
+ OnLoaded = _PropertyGet(&quot;OnLoaded&quot;)
+End Property &apos; OnLoaded (get)
+
+Property Let OnLoaded(ByVal pvValue As Variant)
+ Call _PropertySet(&quot;OnLoaded&quot;, pvValue)
+End Property &apos; OnLoaded (set)
+
+REM -----------------------------------------------------------------------------------------------------------------------
+Property Get OnReloaded() As Variant
+ OnReloaded = _PropertyGet(&quot;OnReloaded&quot;)
+End Property &apos; OnReloaded (get)
+
+Property Let OnReloaded(ByVal pvValue As Variant)
+ Call _PropertySet(&quot;OnReloaded&quot;, pvValue)
+End Property &apos; OnReloaded (set)
+
+REM -----------------------------------------------------------------------------------------------------------------------
+Property Get OnReloading() As Variant
+ OnReloading = _PropertyGet(&quot;OnReloading&quot;)
+End Property &apos; OnReloading (get)
+
+Property Let OnReloading(ByVal pvValue As Variant)
+ Call _PropertySet(&quot;OnReloading&quot;, pvValue)
+End Property &apos; OnReloading (set)
+
+REM -----------------------------------------------------------------------------------------------------------------------
+Property Get OnResetted() As Variant
+ OnResetted = _PropertyGet(&quot;OnResetted&quot;)
+End Property &apos; OnResetted (get)
+
+Property Let OnResetted(ByVal pvValue As Variant)
+ Call _PropertySet(&quot;OnResetted&quot;, pvValue)
+End Property &apos; OnResetted (set)
+
+REM -----------------------------------------------------------------------------------------------------------------------
+Property Get OnRowChanged() As Variant
+ OnRowChanged = _PropertyGet(&quot;OnRowChanged&quot;)
+End Property &apos; OnRowChanged (get)
+
+Property Let OnRowChanged(ByVal pvValue As Variant)
+ Call _PropertySet(&quot;OnRowChanged&quot;, pvValue)
+End Property &apos; OnRowChanged (set)
+
+REM -----------------------------------------------------------------------------------------------------------------------
+Property Get OnUnloaded() As Variant
+ OnUnloaded = _PropertyGet(&quot;OnUnloaded&quot;)
+End Property &apos; OnUnloaded (get)
+
+Property Let OnUnloaded(ByVal pvValue As Variant)
+ Call _PropertySet(&quot;OnUnloaded&quot;, pvValue)
+End Property &apos; OnUnloaded (set)
+
+REM -----------------------------------------------------------------------------------------------------------------------
+Property Get OnUnloading() As Variant
+ OnUnloading = _PropertyGet(&quot;OnUnloading&quot;)
+End Property &apos; OnUnloading (get)
+
+Property Let OnUnloading(ByVal pvValue As Variant)
+ Call _PropertySet(&quot;OnUnloading&quot;, pvValue)
+End Property &apos; OnUnloading (set)
+
+REM -----------------------------------------------------------------------------------------------------------------------
Property Get ObjectType() As String
ObjectType = _PropertyGet(&quot;ObjectType&quot;)
End Property &apos; ObjectType (get)
@@ -198,9 +333,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, _Shortcut, vPropertiesList)
Else
- vProperty = PropertiesGet._Properties(sObject, _Name, vPropertiesList, pvIndex)
+ vProperty = PropertiesGet._Properties(sObject, _Shortcut, vPropertiesList, pvIndex)
vProperty._Value = _PropertyGet(vPropertiesList(pvIndex))
End If
@@ -377,12 +512,43 @@ End Function
REM -----------------------------------------------------------------------------------------------------------------------
REM --- PRIVATE FUNCTIONS ---
REM -----------------------------------------------------------------------------------------------------------------------
+
+Private Function _GetListener(ByVal psProperty As String) As String
+&apos; Return the X...Listener corresponding with the property in argument
+
+ Select Case UCase(psProperty)
+ Case UCase(&quot;OnApproveCursorMove&quot;)
+ _GetListener = &quot;XRowSetApproveListener&quot;
+ Case UCase(&quot;OnApproveParameter&quot;)
+ _GetListener = &quot;XDatabaseParameterListener&quot;
+ Case UCase(&quot;OnApproveReset&quot;), UCase(&quot;OnResetted&quot;)
+ _GetListener = &quot;XResetListener&quot;
+ Case UCase(&quot;OnApproveRowChange&quot;)
+ _GetListener = &quot;XRowSetApproveListener&quot;
+ Case UCase(&quot;OnApproveSubmit&quot;)
+ _GetListener = &quot;XSubmitListener&quot;
+ Case UCase(&quot;OnConfirmDelete&quot;)
+ _GetListener = &quot;XConfirmDeleteListener&quot;
+ Case UCase(&quot;OnCursorMoved&quot;), UCase(&quot;OnRowChanged&quot;)
+ _GetListener = &quot;XRowSetListener&quot;
+ Case UCase(&quot;OnErrorOccurred&quot;)
+ _GetListener = &quot;XSQLErrorListener&quot;
+ Case UCase(&quot;OnLoaded&quot;), UCase(&quot;OnReloaded&quot;), UCase(&quot;OnReloading&quot;), UCase(&quot;OnUnloaded&quot;), UCase(&quot;OnUnloading&quot;)
+ _GetListener = &quot;XLoadListener&quot;
+ End Select
+
+End Function &apos; _GetListener V1.7.0
+
REM -----------------------------------------------------------------------------------------------------------------------
Private Function _PropertiesList() As Variant
_PropertiesList = Array(&quot;AllowAdditions&quot;, &quot;AllowDeletions&quot;, &quot;AllowEdits&quot;, &quot;CurrentRecord&quot; _
, &quot;Filter&quot;, &quot;FilterOn&quot;, &quot;LinkChildFields&quot;, &quot;LinkMasterFields&quot;, &quot;Name&quot; _
- , &quot;ObjectType&quot;, &quot;OrderBy&quot;, &quot;OrderByOn&quot;, &quot;Parent&quot;, &quot;RecordSource&quot; _
+ , &quot;ObjectType&quot;, &quot;OnApproveCursorMove&quot;, &quot;OnApproveParameter&quot; _
+ , &quot;OnApproveReset&quot;, &quot;OnApproveRowChange&quot;, &quot;OnApproveSubmit&quot;, &quot;OnConfirmDelete&quot; _
+ , &quot;OnCursorMoved&quot;, &quot;OnErrorOccurred&quot;, &quot;OnLoaded&quot;, &quot;OnReloaded&quot;, &quot;OnReloading&quot; _
+ , &quot;OnResetted&quot;, &quot;OnRowChanged&quot;, &quot;OnUnloaded&quot;, &quot;OnUnloading&quot;, &quot;OrderBy&quot; _
+ , &quot;OrderByOn&quot;, &quot;Parent&quot;, &quot;RecordSource&quot; _
) &apos; Recordset removed
End Function &apos; _PropertiesList
@@ -442,10 +608,17 @@ Dim oDatabase As Object, vBookmark As Variant, vEMPTY As Variant
_PropertyGet = _Name
Case UCase(&quot;ObjectType&quot;)
_PropertyGet = _Type
+ Case UCase(&quot;OnApproveCursorMove&quot;), UCase(&quot;OnApproveParameter&quot;), UCase(&quot;OnApproveReset&quot;), UCase(&quot;OnApproveRowChange&quot;) _
+ , UCase(&quot;OnApproveSubmit&quot;), UCase(&quot;OnConfirmDelete&quot;), UCase(&quot;OnCursorMoved&quot;), UCase(&quot;OnErrorOccurred&quot;) _
+ , UCase(&quot;OnLoaded&quot;), UCase(&quot;OnReloaded&quot;), UCase(&quot;OnReloading&quot;), UCase(&quot;OnResetted&quot;), UCase(&quot;OnRowChanged&quot;) _
+ , UCase(&quot;OnUnloaded&quot;), UCase(&quot;OnUnloading&quot;)
+ _PropertyGet = Utils._GetEventScriptCode(DatabaseForm, psProperty, _Name)
Case UCase(&quot;OrderBy&quot;)
_PropertyGet = _OrderBy
Case UCase(&quot;OrderByOn&quot;)
If DatabaseForm.Order = &quot;&quot; Then _PropertyGet = False Else _PropertyGet = True
+ Case UCase(&quot;Parent&quot;) &apos; Only for indirect access from property object
+ _PropertyGet = Parent
Case UCase(&quot;Recordset&quot;)
If DatabaseForm.Command = &quot;&quot; Then Goto Trace_Error &apos; No underlying data ??
Set oObject = New Recordset
@@ -525,6 +698,16 @@ Dim iArgNr As Integer
If Not Utils._CheckArgument(pvValue, iArgNr, vbBoolean, , False) Then Goto Trace_Error_Value
DatabaseForm.ApplyFilter = pvValue
DatabaseForm.reload()
+ Case UCase(&quot;OnApproveCursorMove&quot;), UCase(&quot;OnApproveParameter&quot;), UCase(&quot;OnApproveReset&quot;), UCase(&quot;OnApproveRowChange&quot;) _
+ , UCase(&quot;OnApproveSubmit&quot;), UCase(&quot;OnConfirmDelete&quot;), UCase(&quot;OnCursorMoved&quot;), UCase(&quot;OnErrorOccurred&quot;) _
+ , UCase(&quot;OnLoaded&quot;), UCase(&quot;OnReloaded&quot;), UCase(&quot;OnReloading&quot;), UCase(&quot;OnResetted&quot;), UCase(&quot;OnRowChanged&quot;) _
+ , UCase(&quot;OnUnloaded&quot;), UCase(&quot;OnUnloading&quot;)
+ If Not Utils._CheckArgument(pvValue, iArgNr, vbString, , False) Then Goto Trace_Error_Value
+ If Not Utils._RegisterEventScript(DatabaseForm _
+ , psProperty _
+ , _GetListener(psProperty) _
+ , pvValue, _Name _
+ ) Then GoTo Trace_Error
Case UCase(&quot;OrderBy&quot;)
If Not Utils._CheckArgument(pvValue, iArgNr, vbString, , False) Then Goto Trace_Error_Value
_OrderBy = Application._CurrentDb(_DocEntry, _DbEntry)._ReplaceSquareBrackets(pvValue)
diff --git a/wizards/source/access2base/Utils.xba b/wizards/source/access2base/Utils.xba
index c2b6172b2484..d84259696ce2 100644
--- a/wizards/source/access2base/Utils.xba
+++ b/wizards/source/access2base/Utils.xba
@@ -216,6 +216,45 @@ Dim oDialogLib As Object
End Function
REM -----------------------------------------------------------------------------------------------------------------------
+Public Function _GetEventScriptCode(poObject As Object _
+ , ByVal psEvent As String _
+ , ByVal psName As String _
+ , Optional ByVal pbExtendName As Boolean _
+ ) As String
+&apos; Extract from the parent of poObject the macro linked to psEvent.
+&apos; psName is the name of the object
+
+Dim i As Integer, vEvents As Variant, sEvent As String, oParent As Object, iIndex As Integer, sName As String
+
+ _GetEventScriptCode = &quot;&quot;
+ If Not Utils._hasUNOMethod(poObject, &quot;getParent&quot;) Then Exit Function
+
+ &apos; Find form index i.e. find control via getByIndex()
+ If IsMissing(pbExtendName) Then pbExtendName = False
+ Set oParent = poObject.getParent()
+ iIndex = -1
+ For i = 0 To oParent.getCount() - 1
+ sName = oParent.getByIndex(i).Name
+ If (sName = psName) Or (pbExtendName And (sName = &quot;MainForm&quot; Or sName = &quot;Form&quot;)) Then
+ iIndex = i
+ Exit For
+ End If
+ Next i
+ If iIndex &lt; 0 Then Exit Function
+
+ &apos; Find script event
+ vEvents = oParent.getScriptEvents(iIndex) &apos; Returns an array
+ sEvent = Utils._GetEventName(psEvent) &apos; Targeted event method
+ For i = 0 To UBound(vEvents)
+ If vEvents(i).EventMethod = sEvent Then
+ _GetEventScriptCode = vEvents(i).ScriptCode
+ Exit For
+ End If
+ Next i
+
+End Function &apos; _GetEventScriptCode V1.7.0
+
+REM -----------------------------------------------------------------------------------------------------------------------
Private Function _GetResultSetColumnValue(poResultSet As Object _
, ByVal piColIndex As Integer _
, Optional ByVal pbReturnBinary As Boolean _
@@ -327,6 +366,15 @@ Dim sComponents() As String, sSubComponents() As String
End Function &apos; FinalProperty
REM -----------------------------------------------------------------------------------------------------------------------
+Public Function _GetEventName(ByVal psProperty As String) As String
+&apos; Return the LO internal event name
+&apos; Corrects the typo on ErrorOccur(r?)ed
+
+ _GetEventName = Replace(LCase(Mid(psProperty, 3, 1)) &amp; Right(psProperty, Len(psProperty) - 3), &quot;errorOccurred&quot;, &quot;errorOccured&quot;)
+
+End Function &apos; _GetEventName V1.7.0
+
+REM -----------------------------------------------------------------------------------------------------------------------
Public Function _GetProductName(ByVal Optional psFlag As String) as String
&apos;Return OO product (&quot;PRODUCT&quot;) and version numbers (&quot;VERSION&quot;)
&apos;Derived from Tools library
@@ -418,6 +466,7 @@ Public Function _hasUNOMethod(pvObject As Variant, psMethod As String) As Boolea
Dim vInspect as Variant
_hasUNOMethod = False
+ If IsNull(pvObject) Then Exit Function
On Local Error Resume Next
vInspect = _A2B_.Introspection.Inspect(pvObject)
_hasUNOMethod = vInspect.hasMethod(psMethod, com.sun.star.beans.MethodConcept.ALL)
@@ -431,6 +480,7 @@ Public Function _hasUNOProperty(pvObject As Variant, psProperty As String) As Bo
Dim vInspect as Variant
_hasUNOProperty = False
+ If IsNull(pvObject) Then Exit Function
On Local Error Resume Next
vInspect = _A2B_.Introspection.Inspect(pvObject)
_hasUNOProperty = vInspect.hasProperty(psProperty, com.sun.star.beans.PropertyConcept.ALL)
@@ -780,6 +830,51 @@ Error_Function:
End Function &apos; _ReadFileIntoArray V1.4.0
REM -----------------------------------------------------------------------------------------------------------------------
+Function _RegisterEventScript(poObject As Object _
+ , ByVal psEvent As String _
+ , ByVal psListener As String _
+ , ByVal psScriptCode As String _
+ , ByVal psName As String _
+ , Optional ByVal pbExtendName As Boolean _
+ ) As Boolean
+&apos; Register a script event (psEvent) to poObject (Form, SubForm or Control)
+
+Dim i As Integer, oEvent As Object, sEvent As String, oParent As Object, iIndex As Integer, sName As String
+
+ _RegisterEventScript = False
+ If Not _hasUNOMethod(poObject, &quot;getParent&quot;) Then Exit Function
+
+ &apos; Find object internal index i.e. how to reach it via getByIndex()
+ If IsMissing(pbExtendName) Then pbExtendName = False
+ Set oParent = poObject.getParent()
+ iIndex = -1
+ For i = 0 To oParent.getCount() - 1
+ sName = oParent.getByIndex(i).Name
+ If (sName = psName) Or (pbExtendName And (sName = &quot;MainForm&quot; Or sName = &quot;Form&quot;)) Then
+ iIndex = i
+ Exit For
+ End If
+ Next i
+ If iIndex &lt; 0 Then Exit Function
+
+ sEvent = Utils._GetEventName(psEvent) &apos; Targeted event method
+ If psScriptCode = &quot;&quot; Then
+ oParent.revokeScriptEvent(iIndex, psListener, sEvent, &quot;&quot;)
+ Else
+ Set oEvent = CreateUnoStruct(&quot;com.sun.star.script.ScriptEventDescriptor&quot;)
+ With oEvent
+ .ListenerType = psListener
+ .EventMethod = sEvent
+ .ScriptType = &quot;Script&quot; &apos; Better than &quot;Basic&quot;
+ .ScriptCode = psScriptCode
+ End With
+ oParent.registerScriptEvent(iIndex, oEvent)
+ End If
+ _RegisterEventScript = True
+
+End Function &apos; _RegisterEventScript V1.7.0
+
+REM -----------------------------------------------------------------------------------------------------------------------
Public Sub _ResetCalledSub(ByVal psSub As String)
&apos; Called in bottom of each public function. _A2B_.CalledSub variable is used for error handling
&apos; Used to trace routine in/outs and to clarify error messages
diff --git a/wizards/source/access2base/acConstants.xba b/wizards/source/access2base/acConstants.xba
index 446d1aa9279b..a7dcda83879b 100644
--- a/wizards/source/access2base/acConstants.xba
+++ b/wizards/source/access2base/acConstants.xba
@@ -8,7 +8,7 @@ REM ============================================================================
Option Explicit
REM Access2Base -----------------------------------------------------
-Global Const Access2Base_Version = &quot;1.6.0&quot;
+Global Const Access2Base_Version = &quot;1.7.0&quot;
REM AcCloseSave
REM -----------------------------------------------------------------