LibreOffice logo
BASEDOCUMENTER
The software tool for documenting your LibreOffice Base applications
 
Database file/home/jean-pierre/Documents/BaseDocumenter/www/databases/NorthWind/TT NorthWind.odb
File actual save date2018-08-01 13:54:50
Scanning done on2018-08-21 17:50:26
Documentation generated on2018-08-21 17:50:37
Table of contents
NorthWind
List of modules
Location Library Module name Module type Number of code lines Procedures by module Declaratives
Document Standard _Constants Standard 372  
Option Explicit

REM AcCloseSave
REM -----------------------------------------------------------------
Global Const acSaveNo = 2
Global Const acSavePrompt = 0
Global Const acSaveYes = 1

REM AcFormView
REM -----------------------------------------------------------------
Global Const acDesign = 1
Global Const acNormal = 0
Global Const acPreview = 2

REM AcFormOpenDataMode
REM -----------------------------------------------------------------
Global Const acFormAdd = 0
Global Const acFormEdit = 1
Global Const acFormPropertySettings = -1
Global Const acFormReadOnly = 2

REM acView
REM -----------------------------------------------------------------
Global Const acViewDesign = 1
Global Const acViewNormal = 0
Global Const acViewPreview = 2

REM acOpenDataMode
REM -----------------------------------------------------------------
Global Const acAdd = 0
Global Const acEdit = 1
Global Const acReadOnly = 2

REM AcObjectType
REM -----------------------------------------------------------------
Global Const acDefault = -1
Global Const acDiagram = 8
Global Const acForm = 2
Global Const acQuery = 1
Global Const acReport = 3
Global Const acTable = 0
' Unexisting in MS/Access
Global Const acBasicIDE = 101
Global Const acDatabaseWindow = 102
Global Const acDocument = 111
Global Const acWelcome = 112
' Subtype if acDocument
Global Const docWriter = "Writer"
Global Const docCalc = "Calc"
Global Const docImpress = "Impress"
Global Const docDraw = "Draw"
Global Const docMath = "Math"

REM AcWindowMode
REM -----------------------------------------------------------------
Global Const acDialog = 3
Global Const acHidden = 1
Global Const acIcon = 2
Global Const acWindowNormal = 0

REM VarType constants
REM -----------------------------------------------------------------
Global Const vbEmpty = 0
Global Const vbNull = 1
Global Const vbInteger = 2
Global Const vbLong = 3
Global Const vbSingle = 4
Global Const vbDouble = 5
Global Const vbCurrency = 6
Global Const vbDate = 7
Global Const vbString = 8
Global Const vbObject = 9
Global Const vbBoolean = 11
Global Const vbVariant = 12
Global Const vbByte = 17
Global Const vbUShort = 18
Global Const vbULong = 19
Global Const vbBigint = 35
Global Const vbDecimal = 37

REM MsgBox constants
REM -----------------------------------------------------------------
Global Const vbOKOnly = 0 ' OK button only (default)
Global Const vbOKCancel = 1 ' OK and Cancel buttons
Global Const vbAbortRetryIgnore = 2 ' Abort, Retry, and Ignore buttons
Global Const vbYesNoCancel = 3 ' Yes, No, and Cancel buttons
Global Const vbYesNo = 4 ' Yes and No buttons
Global Const vbRetryCancel = 5 ' Retry and Cancel buttons
Global Const vbCritical = 16 ' Critical message
Global Const vbQuestion = 32 ' Warning query
Global Const vbExclamation = 48 ' Warning message
Global Const vbInformation = 64 ' Information message
Global Const vbDefaultButton1 = 128 ' First button is default (default) (VBA: 0)
Global Const vbDefaultButton2 = 256 ' Second button is default
Global Const vbDefaultButton3 = 512 ' Third button is default
Global Const vbApplicationModal = 0 ' Application modal message box (default)
REM MsgBox Return Values
REM -----------------------------------------------------------------
Global Const vbOK = 1 ' OK button pressed
Global Const vbCancel = 2 ' Cancel button pressed
Global Const vbAbort = 3 ' Abort button pressed
Global Const vbRetry = 4 ' Retry button pressed
Global Const vbIgnore = 5 ' Ignore button pressed
Global Const vbYes = 6 ' Yes button pressed
Global Const vbNo = 7 ' No button pressed

REM Dialogs Return Values
REM ------------------------------------------------------------------
Global Const dlgOK = 1 ' OK button pressed
Global Const dlgCancel = 0 ' Cancel button pressed

REM Control Types
REM -----------------------------------------------------------------
Global Const acCheckBox = 5
Global Const acComboBox = 7
Global Const acCommandButton = 2 : Global Const acToggleButton = 122
Global Const acCurrencyField = 18
Global Const acDateField = 15
Global Const acFileControl = 12
Global Const acFixedLine = 24 ' FREE ENTRY (USEFUL IN DIALOGS)
Global Const acFixedText = 10 : Global Const acLabel = 10
Global Const acFormattedField = 1 ' FREE ENTRY TAKEN TO NOT CONFUSE WITH acTextField
Global Const acGridControl = 11
Global Const acGroupBox = 8 : Global Const acOptionGroup = 8
Global Const acHiddenControl = 13
Global Const acImageButton = 4
Global Const acImageControl = 14 : Global Const acImage = 14
Global Const acListBox = 6
Global Const acNavigationBar = 22
Global Const acNumericField = 17
Global Const acPatternField = 19
Global Const acProgressBar = 23 ' FREE ENTRY (USEFUL IN DIALOGS)
Global Const acRadioButton = 3 : Global Const acOptionButton = 3
Global Const acScrollBar = 20
Global Const acSpinButton = 21
Global Const acSubform = 112
Global Const acTextField = 9 : Global Const acTextBox = 9
Global Const acTimeField = 16

REM Record
REM -----------------------------------------------------------------
Global Const acFirst = 2
Global Const acGoTo = 4
Global Const acLast = 3
Global Const acNewRec = 5
Global Const acNext = 1
Global Const acPrevious = 0

REM FindRecord
REM -----------------------------------------------------------------
Global Const acAnywhere = 0
Global Const acEntire = 1
Global Const acStart = 2
Global Const acDown = 1
Global Const acSearchAll = 2
Global Const acUp = 0
Global Const acAll = 0
Global Const acCurrent = -1

REM AcDataObjectType
REM -----------------------------------------------------------------
Global Const acActiveDataObject = -1
Global Const acDataForm = 2
Global Const acDataQuery = 1
Global Const acDataServerView = 7
Global Const acDataStoredProcedure = 9
Global Const acDataTable = 0

REM AcRecord
REM -----------------------------------------------------------------
Global Const acFirst = 2
Global Const acGoTo = 4
Global Const acLast = 3
Global Const acNewRec = 5
Global Const acNext = 1
Global Const acPrevious = 0

REM AcQuitOption
REM -----------------------------------------------------------------
Global Const acQuitPrompt = 0
Global Const acQuitSaveAll = 1
Global Const acQuitSaveNone = 2

REM AcCommand
REM -----------------------------------------------------------------
Global Const acCmdAboutMicrosoftAccess = 35
Global Const acCmdAboutOpenOffice = 35
Global Const acCmdAboutLibreOffice = 35
Global Const acCmdVisualBasicEditor = 525
Global Const acCmdBringToFront = 52
Global Const acCmdClose = 58
Global Const acCmdToolbarsCustomize = 165
Global Const acCmdChangeToCommandButton = 501
Global Const acCmdChangeToCheckBox = 231
Global Const acCmdChangeToComboBox = 230
Global Const acCmdChangeToTextBox = 227
Global Const acCmdChangeToLabel = 228
Global Const acCmdChangeToImage = 234
Global Const acCmdChangeToListBox = 229
Global Const acCmdChangeToOptionButton = 233
Global Const acCmdCopy = 190
Global Const acCmdCut = 189
Global Const acCmdCreateRelationship = 150
Global Const acCmdDelete = 337
Global Const acCmdDatabaseProperties = 256
Global Const acCmdSQLView = 184
Global Const acCmdRemove = 366
Global Const acCmdDesignView = 183
Global Const acCmdFormView = 281
Global Const acCmdNewObjectForm = 136
Global Const acCmdNewObjectTable = 134
Global Const acCmdNewObjectView = 350
Global Const acCmdOpenDatabase = 25
Global Const acCmdRemove = 366
Global Const acCmdDesignView = 183
Global Const acCmdNewObjectQuery = 135
Global Const acCmdShowAllRelationships = 149
Global Const acCmdRemove = 366
Global Const acCmdDesignView = 183
Global Const acCmdNewObjectReport = 137
Global Const acCmdSelectAll = 333
Global Const acCmdRemoveTable = 84
Global Const acCmdDesignView = 183
Global Const acCmdOpenTable = 221
Global Const acCmdRename = 143
Global Const acCmdDelete = 337
Global Const acCmdDeleteRecord = 223
Global Const acCmdApplyFilterSort = 93
Global Const acCmdSnapToGrid = 62
Global Const acCmdViewGrid = 63
Global Const acCmdInsertHyperlink = 259
Global Const acCmdMaximumRecords = 508
Global Const acCmdObjectBrowser = 200
Global Const acCmdPaste = 191
Global Const acCmdPasteSpecial = 64
Global Const acCmdPrint = 340
Global Const acCmdPrintPreview = 54
Global Const acCmdSaveRecord = 97
Global Const acCmdFind = 30
Global Const acCmdUndo = 292
Global Const acCmdRefresh = 18
Global Const acCmdRemoveFilterSort = 144
Global Const acCmdRunMacro = 31
Global Const acCmdSave = 20
Global Const acCmdSaveAs = 21
Global Const acCmdFind = 30
Global Const acCmdSelectAll = 333
Global Const acCmdSelectAllRecords = 109
Global Const acCmdSendToBack = 53
Global Const acCmdSortDescending = 164
Global Const acCmdSortAscending = 163
Global Const acCmdTabOrder = 41
Global Const acCmdDatasheetView = 282
Global Const acCmdZoomSelection = 371

REM AcSendObjectType
REM -----------------------------------------------------------------
Global Const acSendForm = 2
Global Const acSendNoObject = -1
Global Const acSendQuery = 1
Global Const acSendReport = 3
Global Const acSendTable = 0

REM AcOutputObjectType
REM -----------------------------------------------------------------
Global Const acOutputTable = 0
Global Const acOutputQuery = 1
Global Const acOutputForm = 2

REM AcEncoding
REM -----------------------------------------------------------------
Global Const acUTF8Encoding = 65001

REM AcFormat
REM -----------------------------------------------------------------
Global Const acFormatPDF = "writer_pdf_Export"
Global Const acFormatODT = "writer8"
Global Const acFormatDOC = "MS Word 97"
Global Const acFormatHTML = "HTML"

REM AcExportQuality
REM -----------------------------------------------------------------
Global Const acExportQualityPrint = 0
Global Const acExportQualityScreen = 1

REM AcSysCmdAction
REM -----------------------------------------------------------------
Global Const acSysCmdAccessDir = 9
Global Const acSysCmdAccessVer = 7
Global Const acSysCmdClearHelpTopic = 11
Global Const acSysCmdClearStatus = 5
Global Const acSysCmdGetObjectState = 10
Global Const acSysCmdGetWorkgroupFile = 13
Global Const acSysCmdIniFile = 8
Global Const acSysCmdInitMeter = 1
Global Const acSysCmdProfile = 12
Global Const acSysCmdRemoveMeter = 3
Global Const acSysCmdRuntime = 6
Global Const acSysCmdSetStatus = 4
Global Const acSysCmdUpdateMeter = 2

REM Type property
REM -----------------------------------------------------------------
Global Const dbBigInt = 16
Global Const dbBinary = 9
Global Const dbBoolean = 1
Global Const dbByte = 2
Global Const dbChar = 18
Global Const dbCurrency = 5
Global Const dbDate = 8
Global Const dbDecimal = 20
Global Const dbDouble = 7
Global Const dbFloat = 21
Global Const dbGUID = 15
Global Const dbInteger = 3
Global Const dbLong = 4
Global Const dbLongBinary = 11 ' (OLE Object)
Global Const dbMemo= 12
Global Const dbNumeric = 19
Global Const dbSingle = 6
Global Const dbText = 10
Global Const dbTime = 22
Global Const dbTimeStamp = 23
Global Const dbVarBinary = 17
Global Const dbUndefined = -1

REM Attributes property
REM -----------------------------------------------------------------
Global Const dbAutoIncrField = 16
Global Const dbDescending = 1
Global Const dbFixedField = 1
Global Const dbHyperlinkField = 32768
Global Const dbSystemField = 8192
Global Const dbUpdatableField = 32
Global Const dbVariableField = 2

REM OpenRecordset
REM -----------------------------------------------------------------
Global Const dbOpenForwardOnly = 8
Global Const dbSQLPassThrough = 64
Global Const dbReadOnly = 4

REM Query types
REM -----------------------------------------------------------------
Global Const dbQAction = 240
Global Const dbQAppend = 64
Global Const dbQDDL = 4 '96
Global Const dbQDelete = 32
Global Const dbQMakeTable = 128 '80
Global Const dbQSelect = 0
Global Const dbQSetOperation = 8 '128
Global Const dbQSQLPassThrough = 1 '112
Global Const dbQUpdate = 16 '48

REM Edit mode
REM -----------------------------------------------------------------
Global Const dbEditNone = 0
Global Const dbEditInProgress = 1
Global Const dbEditAdd = 2

REM Toolbars
REM -----------------------------------------------------------------
Global Const msoBarTypeNormal = 0 ' Usual toolbar
Global Const msoBarTypeMenuBar = 1 ' Menu bar
Global Const msoBarTypePopup = 2 ' Shortcut menu
Global Const msoBarTypeStatusBar = 11 ' Status bar
Global Const msoBarTypeFloater = 12 ' Floating window

Global Const msoControlButton = 1 ' Command button
Global Const msoControlPopup = 10 ' Popup, submenu
Document Standard _Init Standard 25 DBOpen
Option Explicit


REM =============================================================================================================================================================================
' LICENSE INFO
' The attached code is distributed in the hope that it will be useful,
' but WITHOUT ANY WARRANTY; without even the implied warranty of
' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Document Standard Browse Standard 34 BrowseThruControls
Main
StartBrowseThruControls
Option Explicit
Document Standard CalculatedField Standard 42 ComputeOrderTotal
ComputeOrderTotalGrid
Option Explicit
Document Standard Calculator Standard 276 CalcButtonPressed
CalcKeyPressed
ProcessKey
StartCalcDialog
StartCalculator
Option Explicit
Document Standard ComboBox Standard 24 Update2ndCombo
UpdateMainForm
Option Explicit
Document Standard CrossTab Standard 130 AliasOf
Main
MakeCrossTab
Option Explicit
Document Standard Dictionary Standard 56 LongStr
ScanSchema
ScanSchemaSQL
ScanTables
 
Document Standard Export Class 665 AppendToFile
ArrBoundsCheck
Class_Initialize
Class_Terminate
ExcludeFields
Export
ExportArr
ExportDatabase
ExportFilename
ExportRs
ExportSource
ExportType
FieldDelimiter
IncludeFieldNames
NoProgressBar
Nz
RecDelimiter
RecordCount
ReplaceStr
ReplaceWith
SysCmd
TextQualifier
VarTypeCheck
Option Compatible
Option ClassModule

Option Explicit

'Exports various sources as delimited text (see sample usage below for details)

'­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­ 
' Sample usage:

' Sub TEDemo()
' On Error GoTo Err_Handler
' Dim TE As TextExport

' Set TE = New TextExport

' With TE
'  .NoProgressBar = False 'optional, default is False
'  .ExportDatabase = CurrentDb 'required if ExportSource is a table name, a query name, or a SQL statement; no default
'  .ExportType = "ASCII" 'optional, ASCII or WP (WordPefrect merge), default is ASCII
'  .ExportSource = "tblErrLog" 'required, either recordset, or tabledef, or querydef, or table name, or query name, or SQL statement, or 2D-array (1st dimension - "columns", 2nd dimension - "rows")
'  .AppendToFile = False 'optional, default is False
'  .ExportFilename = "c:\temp\file.txt" 'required, existing file will be overwritten unless AppendToFile is True
'  .TextQualifier = Chr(34) 'optional, any string, default is "
'  .FieldDelimiter = vbTab 'optional, any string, default is Tab
'  .RecDelimiter = vbCrLf 'optional, any string, default is CrLf
'  .ReplaceWith = " " 'optional, any string, used to replace delimiters found in data, default is one space
'  .IncludeFieldNames = True 'optional, default is True, ignored for arrays and always False for WP merge files
'  .ExcludeFields = "FieldName." 'optional, dot-delimited string of source fields to exclude, ignored for arrays
'  .Export
'  MsgBox .RecordCount & " records exported." 'number of exported records
' End With

' Exit_Here:
'  On Error Resume Next
'  Set TE = Nothing
'  Exit Sub

' Err_Handler:
'  MsgBox Err.Number & ": " & Err.Description
'  Resume Exit_Here

' End Sub

'­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­ 

Private oExport As Object
Private vExport As Variant
Private sTextQualifier As String
Private sFieldDelimiter As String
Private sRecDelimiter As String
Private sReplaceWith As String
Private sExportFilename As String
Private sExportType As String
Private bIncludeFieldNames As Boolean
Private sExcludeFields As String
Private bNoProgress As Boolean
Private bAppend As Boolean
Private lExportedCount As Long

Private iFileNumber As Integer
Private odbCurrent As Object
Private iErrHandling As Integer
Private Type ArrayLayout
ColumnDimension As Long
RowDimension As Long
End Type
Private mAL As ArrayLayout 'orientation of source array

Private Const ERR_INVALID_EXPORT_SOURCE = 1000
Private Const ERR_INVALID_EXPORT_ARRAY = 1005
Private Const ERR_EXP_DB_NOT_SPECIFIED = 1010
Private Const ERR_BAD_DAO_REFERENCE = 1015
Private Const ERR_INVALID_EXCLUDE_LIST = 1020
Document Standard FastSearch Standard 76 CaptureChar
InitList
Option Explicit
Document Standard FastSelect Standard 87 InitFirstList
MoveItems
Option Explicit

Const cstForm = "Products_FastSelect"
Const cstLeftList = "LeftList"
Const cstRightList = "RightList"
Document Standard FillAuto Standard 30 EmpFillAuto
Option Explicit
Document Standard HowTo Standard 219 AddRecordToShippers
CreateRecordsetFromForm
CreateRecordsetFromQuery
CreateRecordsetFromTable
DisplayPosition
ExtractDataTable1Field
ExtractDataTableBulk
FindLimitsRecordset
FindRecordCount
Main
Option Explicit
Document Standard Images Standard 43 ExportImages
ImportImages
Main
Option Explicit
Document Standard ListBox Standard 75 AddAllToList
SyncFormListBoxFilter
SyncFormListBoxMono
SyncFormListBoxMulti
Option Explicit
Document Standard NewRec Standard 33 AskBeforeSave
SetDefaultNewRec
Option Explicit
Document Standard OutputTo Standard 12 Main
Option Explicit
Document Standard Records Standard 80 DMedian
DPercentile
Main
Option Explicit
Document Standard Snippets Standard 43 Example1
Example2
Example3
getUNOTypeName
Main
Option Explicit
Document Standard Synchro Standard 66 SyncCloseForms
SyncForms
Option Explicit
Document Standard Tabbed Standard 21 SelectTab
Option Explicit
Document Standard Test Standard 19 Main
TestGetTable
Option Explicit
Document Standard Tiptext Standard 23 setTipText
Option Explicit
Document Standard Zoom Standard 16 ZoomInit
ZoomInOut
Option Explicit