summaryrefslogtreecommitdiff
path: root/wizards/source/access2base/Recordset.xba
diff options
context:
space:
mode:
authorJean-Pierre Ledure <jp@ledure.be>2020-08-26 16:05:27 +0200
committerJean-Pierre Ledure <jp@ledure.be>2020-08-26 16:05:27 +0200
commit57666b8ba70f27c7250ef32f4cb9e7660e258521 (patch)
tree652e2d08ff40ee2af969b5ab55ff3ba9780f23b2 /wizards/source/access2base/Recordset.xba
parentd29c27af4aff3f5268bd4a07647fd7435603ba11 (diff)
Access2Base - tdf#136063 Workaround Basic missing argument handling (2)
Complementary modifs where behaviour described in bug report could happen in the same way. Root cause IMHO is due to Basic error reported in bug#136143 Change-Id: Ib275f74a0c28995e6b05af31a1fd53b6ae069691
Diffstat (limited to 'wizards/source/access2base/Recordset.xba')
-rw-r--r--wizards/source/access2base/Recordset.xba18
1 files changed, 12 insertions, 6 deletions
diff --git a/wizards/source/access2base/Recordset.xba b/wizards/source/access2base/Recordset.xba
index 094bba000d7b..8260a900eef2 100644
--- a/wizards/source/access2base/Recordset.xba
+++ b/wizards/source/access2base/Recordset.xba
@@ -955,10 +955,18 @@ REM ----------------------------------------------------------------------------
Public Sub _Initialize(ByVal Optional pvFilter As Variant, Optional poRowSet As Object)
&apos; Initialize new recordset
+Dim sFilter As String
+
If _Command = &quot;&quot; Then Exit Sub
If _ErrorHandler() Then On Local Error Goto Error_Sub
- If IsMissing(pvFilter) Then pvFilter = &quot;&quot;
+ If VarType(pvFilter) = vbError Then
+ sFilter = &quot;&quot;
+ ElseIf IsMissing(pvFilter) Then
+ sFilter = &quot;&quot;
+ Else
+ sFilter = pvFilter
+ End If
If Not IsMissing(poRowSet) Then &apos; Clone
Set RowSet = poRowSet.createResultSet()
_IsClone = True
@@ -983,11 +991,9 @@ Public Sub _Initialize(ByVal Optional pvFilter As Variant, Optional poRowSet As
End If
End With
- If Not IsMissing(pvFilter) Then &apos; Filter must be set before execute()
- If pvFilter &lt;&gt; &quot;&quot; Then
- RowSet.Filter = pvFilter
- RowSet.ApplyFilter = True
- End If
+ If sFilter &lt;&gt; &quot;&quot; Then &apos; Filter must be set before execute()
+ RowSet.Filter = sFilter
+ RowSet.ApplyFilter = True
End If
On Local Error Goto SQL_Error
RowSet.execute()