summaryrefslogtreecommitdiff
path: root/wizards
diff options
context:
space:
mode:
authorJean-Pierre Ledure <jp@ledure.be>2018-08-13 11:02:06 +0200
committerCaolán McNamara <caolanm@redhat.com>2018-08-16 17:49:17 +0200
commit9459c5b105e0aad25ccfb875354cfd9c7353cbcb (patch)
tree2ffb5e2c9684232dc6e87504528d079234d77054 /wizards
parent62191a46cd8ceb73145ede57667304b159f5461e (diff)
Access2Base - Fix Filter arg not applied in OpenForm
The Filter argument was not applied in the OpenForm command (was simply ignored and could be worked around by user). Fixed by retrieval of internal DatabaseForm. Change-Id: Iefa697425bb5859979b07cca8ab38f6fe604f92d Reviewed-on: https://gerrit.libreoffice.org/58915 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'wizards')
-rw-r--r--wizards/source/access2base/DoCmd.xba4
1 files changed, 3 insertions, 1 deletions
diff --git a/wizards/source/access2base/DoCmd.xba b/wizards/source/access2base/DoCmd.xba
index ad564b72afd9..c640af7c5478 100644
--- a/wizards/source/access2base/DoCmd.xba
+++ b/wizards/source/access2base/DoCmd.xba
@@ -1139,6 +1139,8 @@ Dim sFilter As String, oForm As Object, oFormsCollection As Object
Else
sFilter = &quot;(&quot; &amp; pvFilterName &amp; &quot;) And (&quot; &amp; pvWhereCondition &amp; &quot;)&quot;
End If
+ Set oFormsCollection = oOpenForm.DrawPage.Forms
+ If oFormsCollection.getCount() &gt; 0 Then Set oForm = oFormsCollection.getByIndex(0) Else Set oForm = Nothing
If Not IsNull(oForm) Then
If sFilter &lt;&gt; &quot;&quot; Then
oForm.Filter = oDatabase._ReplaceSquareBrackets(sFilter)
@@ -2651,4 +2653,4 @@ Dim oShell As Object
End Sub &apos; _ShellExecute V0.8.5
-</script:module> \ No newline at end of file
+</script:module>