diff options
author | Jean-Pierre Ledure <jp@ledure.be> | 2015-12-13 16:06:00 +0100 |
---|---|---|
committer | Jean-Pierre Ledure <jp@ledure.be> | 2015-12-13 16:06:00 +0100 |
commit | ad23fb096d8f65346bf5f0f5095f718532a32941 (patch) | |
tree | 3ab1f0cba4f59ac2a87c659a18d2f6e0ff7e764b /wizards/source | |
parent | bdafd030e5aabc127fb18229968af1ae061359a8 (diff) |
Access2Base - OutputTo action more concise
Simplified use of TableDefs and QueryDefs collections
Change-Id: I87c5dcbbb1105c61324a0a89929f13ff86eab4a4
Diffstat (limited to 'wizards/source')
-rw-r--r-- | wizards/source/access2base/Database.xba | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/wizards/source/access2base/Database.xba b/wizards/source/access2base/Database.xba index 05e7335b0a49..b54915f7d83a 100644 --- a/wizards/source/access2base/Database.xba +++ b/wizards/source/access2base/Database.xba @@ -625,19 +625,12 @@ Const cstThisSub = "Database.OutputTo" If IsMissing(pvQuality) Then pvQuality = acExportQualityPrint If Not Utils._CheckArgument(pvQuality, 7, _AddNumeric(), Array(acExportQualityPrint, acExportQualityScreen)) Then Goto Exit_Function -Dim sOutputFile As String, bFound As Boolean, i As Integer, iCount As Integer, oTable As Object +Dim sOutputFile As String, oTable As Object Dim sOutputFormat As String, iTemplate As Integer, iOutputFile As Integer, bOutput As Boolean, sSuffix As String + 'Find applicable table or query - bFound = False - If pvObjectType = acOutputTable Then iCount = TableDefs.Count Else iCount = Querydefs.Count - For i = 0 To iCount - If pvObjectType = acOutputTable Then Set oTable = TableDefs(i) Else Set oTable = Querydefs(i) - If UCase(oTable._Name) = UCase(pvObjectName) Then - bFound = True - Exit For - End If - Next i - If Not bFound Then Goto Error_NotFound + If pvObjectType = acOutputTable Then Set oTable = TableDefs(pvObjectName, True) Else Set oTable = Querydefs(pvObjectName, True) + If IsNull(oTable) Then Goto Error_NotFound 'Determine format and parameters If pvOutputFormat = "" Then |