summaryrefslogtreecommitdiff
path: root/wizards
diff options
context:
space:
mode:
authorJean-Pierre Ledure <jp@ledure.be>2019-07-06 17:12:39 +0200
committerJean-Pierre Ledure <jp@ledure.be>2019-07-06 17:12:39 +0200
commit02999ba5e40475b5ddc7280376fd68c4b380d27e (patch)
tree698f7a377019d41902e4c29eb583f1f22ca6d1d9 /wizards
parentfba2fe825e8dfb9fd084186e3171bbea35297c28 (diff)
Access2Base - Make OptionGroups valid Collections
+ argument check on RunSQL
Diffstat (limited to 'wizards')
-rw-r--r--wizards/source/access2base/Collect.xba7
-rw-r--r--wizards/source/access2base/DoCmd.xba2
-rw-r--r--wizards/source/access2base/OptionGroup.xba3
3 files changed, 4 insertions, 8 deletions
diff --git a/wizards/source/access2base/Collect.xba b/wizards/source/access2base/Collect.xba
index f8e24ead323e..df964b058b34 100644
--- a/wizards/source/access2base/Collect.xba
+++ b/wizards/source/access2base/Collect.xba
@@ -88,12 +88,7 @@ Dim vNames() As Variant, oProperty As Object
Set Item = _Parent.CommandBarControls(pvItem)
Case COLLCONTROLS
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
+ Set Item = _Parent.Controls(pvItem)
Case COLLFORMS
Set Item = Application.Forms(pvItem)
Case COLLFIELDS
diff --git a/wizards/source/access2base/DoCmd.xba b/wizards/source/access2base/DoCmd.xba
index a54bc05a6b92..27b0d74be34f 100644
--- a/wizards/source/access2base/DoCmd.xba
+++ b/wizards/source/access2base/DoCmd.xba
@@ -1756,7 +1756,7 @@ Const cstNull = -1
If IsMissing(pvOption) Then
pvOption = cstNull
Else
- If Not Utils._CheckArgument(pvOption, 2, Utils._AddNumeric(), dbSQLPassThrough) Then Goto Exit_Function
+ If Not Utils._CheckArgument(pvOption, 2, Utils._AddNumeric(), Array(cstNull, dbSQLPassThrough)) Then Goto Exit_Function
End If
RunSQL = Application._CurrentDb.RunSQL(pvSQL, pvOption)
diff --git a/wizards/source/access2base/OptionGroup.xba b/wizards/source/access2base/OptionGroup.xba
index 080fde83b7cb..02c9c170a808 100644
--- a/wizards/source/access2base/OptionGroup.xba
+++ b/wizards/source/access2base/OptionGroup.xba
@@ -115,13 +115,14 @@ If _ErrorHandler() Then On Local Error Goto Error_Function
Utils._SetCalledSub(&quot;OptionGroup.Controls&quot;)
Dim ocControl As Variant, iArgNr As Integer, i As Integer
+Dim oCounter As Object
Set ocControl = Nothing
If IsMissing(pvIndex) Then &apos; No argument, return Collection object
Set oCounter = New Collect
Set oCounter._This = oCounter
- oCounter._SubType = OBJCONTROL
+ oCounter._CollType = COLLCONTROLS
Set oCounter._Parent = _This
oCounter._Count = _Count
Set Controls = oCounter