diff options
author | Jean-Pierre Ledure <jp@ledure.be> | 2018-08-02 11:44:45 +0200 |
---|---|---|
committer | Jean-Pierre Ledure <jp@ledure.be> | 2018-08-02 11:44:45 +0200 |
commit | 8c65831e4c67a7978a297030d04dea8d6aa21712 (patch) | |
tree | c4392406b9a78d71a1d398d2e963e77ea5fdaefe /wizards | |
parent | 2f3684b2289a8c46dc6144064a452cc529400f28 (diff) |
Access2Base - Fix undeclared variable
CloseConnection: error handling is switched off
Error was not user visible but left connection(s) unclosed.
Diffstat (limited to 'wizards')
-rw-r--r-- | wizards/source/access2base/Root_.xba | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/wizards/source/access2base/Root_.xba b/wizards/source/access2base/Root_.xba index 748e6c2e9fb0..3cfe3e5d5a67 100644 --- a/wizards/source/access2base/Root_.xba +++ b/wizards/source/access2base/Root_.xba @@ -43,7 +43,6 @@ REM ---------------------------------------------------------------------------- REM --- CONSTRUCTORS / DESTRUCTORS --- REM ----------------------------------------------------------------------------------------------------------------------- Private Sub Class_Initialize() -Dim vCurrentDoc() As Variant VersionNumber = Access2Base_Version ErrorHandler = True MinimalTraceLevel = 0 @@ -67,10 +66,9 @@ Dim vCurrentDoc() As Variant Set StatusBar = Nothing Set Dialogs = New Collection Set TempVars = New Collection - vCurrentDoc() = Array() - ReDim vCurrentDoc(0 To 0) - Set vCurrentDoc(0) = Nothing - Set CurrentDoc() = vCurrentDoc() + CurrentDoc = Array() + ReDim CurrentDoc(0 To 0) + Set CurrentDoc(0) = Nothing End Sub ' Constructor REM ----------------------------------------------------------------------------------------------------------------------- @@ -107,7 +105,7 @@ Dim vDbContainer As Variant, vDbContainers() As Variant, vDocContainer As Varian iCurrentDoc = CurrentDocIndex( , False) ' False prevents error raising if not found If iCurrentDoc < 0 Then GoTo Exit_Sub ' If not found ignore - vDocContainer = CurrentDocument(iCurrentDoc) + vDocContainer = CurrentDoc(iCurrentDoc) With vDocContainer If Not .Active Then GoTo Exit_Sub ' e.g. if successive calls to CloseConnection() For i = 0 To UBound(.DbContainers) |