Sfoglia il codice sorgente

Nouvelle interface

olivier.massot 9 anni fa
parent
commit
fd2fca8839

BIN
OpenAccess.zip


+ 1 - 1
source/database.properties

@@ -12,7 +12,7 @@ Build	727	4
 ProjVer	119	3
 ProjVer	119	3
 HasOfflineLists	70	3
 HasOfflineLists	70	3
 UseMDIMode	0	2
 UseMDIMode	0	2
-ShowDocumentTabs	Faux	1
+ShowDocumentTabs	Vrai	1
 Picture Property Storage Format	0	4
 Picture Property Storage Format	0	4
 WebDesignMode	0	2
 WebDesignMode	0	2
 CheckTruncatedNumFields	1	4
 CheckTruncatedNumFields	1	4

+ 1149 - 0
source/forms/OpenAccess.bas

@@ -0,0 +1,1149 @@
+Version =20
+VersionRequired =20
+Begin Form
+    AllowFilters = NotDefault
+    PopUp = NotDefault
+    Modal = NotDefault
+    RecordSelectors = NotDefault
+    MaxButton = NotDefault
+    MinButton = NotDefault
+    AutoCenter = NotDefault
+    NavigationButtons = NotDefault
+    AllowDeletions = NotDefault
+    DividingLines = NotDefault
+    AllowAdditions = NotDefault
+    AllowDesignChanges = NotDefault
+    DefaultView =0
+    BorderStyle =1
+    PictureAlignment =2
+    DatasheetGridlinesBehavior =3
+    GridY =10
+    Width =6645
+    DatasheetFontHeight =11
+    ItemSuffix =41
+    Left =-16140
+    Top =-1425
+    Right =-6840
+    Bottom =10920
+    DatasheetGridlinesColor =14806254
+    RecSrcDt = Begin
+        0xeb366d1c54d7e440
+    End
+    Caption ="OpenAccess"
+    OnCurrent ="[Event Procedure]"
+    DatasheetFontName ="Calibri"
+    PrtMip = Begin
+        0x6801000068010000680100006801000000000000201c0000e010000001000000 ,
+        0x010000006801000000000000a10700000100000001000000
+    End
+    FilterOnLoad =0
+    ShowPageMargins =0
+    DisplayOnSharePointSite =1
+    DatasheetAlternateBackColor =15921906
+    DatasheetGridlinesColor12 =0
+    FitToScreen =255
+    DatasheetBackThemeColorIndex =1
+    BorderThemeColorIndex =3
+    ThemeFontIndex =1
+    ForeThemeColorIndex =0
+    AlternateBackThemeColorIndex =1
+    AlternateBackShade =95.0
+    Begin
+        Begin Label
+            BackStyle =0
+            FontSize =11
+            FontName ="Calibri"
+            ThemeFontIndex =1
+            BackThemeColorIndex =1
+            BorderThemeColorIndex =0
+            BorderTint =50.0
+            ForeThemeColorIndex =0
+            ForeTint =50.0
+            GridlineThemeColorIndex =1
+            GridlineShade =65.0
+        End
+        Begin CommandButton
+            Width =1701
+            Height =283
+            FontSize =11
+            FontWeight =400
+            FontName ="Calibri"
+            ForeThemeColorIndex =0
+            ForeTint =75.0
+            GridlineThemeColorIndex =1
+            GridlineShade =65.0
+            UseTheme =1
+            Shape =1
+            Gradient =12
+            BackThemeColorIndex =4
+            BackTint =60.0
+            BorderLineStyle =0
+            BorderColor =16777215
+            BorderThemeColorIndex =4
+            BorderTint =60.0
+            ThemeFontIndex =1
+            HoverThemeColorIndex =4
+            HoverTint =40.0
+            PressedThemeColorIndex =4
+            PressedShade =75.0
+            HoverForeThemeColorIndex =0
+            HoverForeTint =75.0
+            PressedForeThemeColorIndex =0
+            PressedForeTint =75.0
+        End
+        Begin OptionButton
+            BorderLineStyle =0
+            LabelX =230
+            LabelY =-30
+            BorderThemeColorIndex =1
+            BorderShade =65.0
+            GridlineThemeColorIndex =1
+            GridlineShade =65.0
+        End
+        Begin CheckBox
+            BorderLineStyle =0
+            LabelX =230
+            LabelY =-30
+            BorderThemeColorIndex =1
+            BorderShade =65.0
+            GridlineThemeColorIndex =1
+            GridlineShade =65.0
+        End
+        Begin OptionGroup
+            SpecialEffect =3
+            BorderLineStyle =0
+            Width =1701
+            Height =1701
+            BackThemeColorIndex =1
+            BorderThemeColorIndex =1
+            BorderShade =65.0
+            GridlineThemeColorIndex =1
+            GridlineShade =65.0
+        End
+        Begin TextBox
+            AddColon = NotDefault
+            FELineBreak = NotDefault
+            BorderLineStyle =0
+            Width =1701
+            LabelX =-1701
+            FontSize =11
+            FontName ="Calibri"
+            AsianLineBreak =1
+            BackThemeColorIndex =1
+            BorderThemeColorIndex =1
+            BorderShade =65.0
+            ThemeFontIndex =1
+            ForeThemeColorIndex =0
+            ForeTint =75.0
+            GridlineThemeColorIndex =1
+            GridlineShade =65.0
+        End
+        Begin EmptyCell
+            Height =240
+            GridlineColor =12632256
+            GridlineThemeColorIndex =1
+            GridlineShade =65.0
+        End
+        Begin Section
+            Height =5839
+            Name ="Détail"
+            AlternateBackColor =15921906
+            AlternateBackThemeColorIndex =1
+            AlternateBackShade =95.0
+            BackThemeColorIndex =1
+            Begin
+                Begin Label
+                    OverlapFlags =85
+                    TextAlign =2
+                    TextFontFamily =49
+                    Width =6645
+                    Height =330
+                    FontSize =12
+                    FontWeight =700
+                    BorderColor =8355711
+                    ForeColor =8355711
+                    Name ="lbl_title"
+                    Caption ="OpenAccess - Generate your Source Code"
+                    FontName ="Consolas"
+                    GridlineColor =10921638
+                    LayoutCachedWidth =6645
+                    LayoutCachedHeight =330
+                    ThemeFontIndex =-1
+                End
+                Begin Label
+                    FontItalic = NotDefault
+                    OverlapFlags =85
+                    TextAlign =3
+                    TextFontFamily =49
+                    Left =1858
+                    Top =5442
+                    Width =4599
+                    Height =223
+                    FontSize =8
+                    BorderColor =8355711
+                    Name ="lbl_author"
+                    Caption ="Conseil départemental du Bas-Rhin, 2016"
+                    FontName ="Consolas"
+                    GridlineColor =10921638
+                    LayoutCachedLeft =1858
+                    LayoutCachedTop =5442
+                    LayoutCachedWidth =6457
+                    LayoutCachedHeight =5665
+                    ThemeFontIndex =-1
+                    ForeTint =100.0
+                End
+                Begin OptionGroup
+                    TabStop = NotDefault
+                    OverlapFlags =93
+                    Left =283
+                    Top =573
+                    Width =6123
+                    Height =1696
+                    BorderColor =10921638
+                    Name ="zne_export"
+                    DefaultValue ="1"
+                    GridlineColor =10921638
+
+                    LayoutCachedLeft =283
+                    LayoutCachedTop =573
+                    LayoutCachedWidth =6406
+                    LayoutCachedHeight =2269
+                    Begin
+                        Begin Label
+                            BackStyle =1
+                            OverlapFlags =215
+                            TextFontFamily =49
+                            Left =410
+                            Top =453
+                            Width =3165
+                            Height =315
+                            FontSize =9
+                            BorderColor =8355711
+                            Name ="lbl_export_title"
+                            Caption ="Generate the sources files"
+                            FontName ="Consolas"
+                            GridlineColor =10921638
+                            LayoutCachedLeft =410
+                            LayoutCachedTop =453
+                            LayoutCachedWidth =3575
+                            LayoutCachedHeight =768
+                            ThemeFontIndex =-1
+                            ForeTint =100.0
+                        End
+                    End
+                End
+                Begin OptionGroup
+                    TabStop = NotDefault
+                    OverlapFlags =93
+                    Left =283
+                    Top =2502
+                    Width =6123
+                    Height =1471
+                    TabIndex =1
+                    BorderColor =10921638
+                    Name ="zne_import"
+                    GridlineColor =10921638
+
+                    LayoutCachedLeft =283
+                    LayoutCachedTop =2502
+                    LayoutCachedWidth =6406
+                    LayoutCachedHeight =3973
+                    Begin
+                        Begin Label
+                            BackStyle =1
+                            OverlapFlags =215
+                            TextFontFamily =49
+                            Left =410
+                            Top =2381
+                            Width =4290
+                            Height =315
+                            FontSize =9
+                            BorderColor =8355711
+                            Name ="lbl_import_title"
+                            Caption ="Update your app from the sources files"
+                            FontName ="Consolas"
+                            GridlineColor =10921638
+                            LayoutCachedLeft =410
+                            LayoutCachedTop =2381
+                            LayoutCachedWidth =4700
+                            LayoutCachedHeight =2696
+                            ThemeFontIndex =-1
+                            ForeTint =100.0
+                        End
+                    End
+                End
+                Begin CommandButton
+                    OverlapFlags =215
+                    TextFontFamily =49
+                    Left =5225
+                    Top =793
+                    Width =804
+                    Height =739
+                    FontSize =9
+                    TabIndex =6
+                    Name ="cmd_export"
+                    Caption ="Make sources"
+                    OnClick ="[Event Procedure]"
+                    FontName ="Consolas"
+                    ControlTipText ="Run the OpenAccess export"
+                    LeftPadding =60
+                    RightPadding =75
+                    BottomPadding =120
+                    GridlineColor =10921638
+                    ImageData = Begin
+                        0x2800000010000000100000000100200000000000000000000000000000000000 ,
+                        0x0000000000000000c0a8a0ff807060ff807060ff807060ff807060ff807060ff ,
+                        0x807060ff807060ff807060ff807060ff807060ff807060ff0000000000000000 ,
+                        0x0000000000000000c0b0a0fffff8f0fffff8f0fffff8f0fffff8f0fffff8f0ff ,
+                        0xfff8f0fffff8f0fffff0f0fffff0f0fffff0f0ff807060ff0000000000000000 ,
+                        0x0000000000000000c0b0a0fffff8fffffff8f0fffff8f0fffff8f0fffff8f0ff ,
+                        0xfff8f0fffff8f0fffff8f0fffff8f0fffff8f0ff807060ff0000000000000000 ,
+                        0x0000000000000000c0b0a0fffff8ffffe0d0d0ffe0d0d0ffe0d0d0ffe0d0d0ff ,
+                        0xe0d0d0ffe0d0d0ffe0d0d0ffe0d0d0fffff8f0ffb0a090ffffffff50ffffff20 ,
+                        0xffffff0000000000c0b0a0fffff8fffffff8f0fffff8f0fffff8f0fffff8f0ff ,
+                        0xfff8f0fffff8f0fffff0f0fffff0f0fffff8f0ffd0d0c0ff805030ffe0c0b090 ,
+                        0xffffff1000000000c0b0a0fffff8ffffe0d0d0ffe0d0d0ffe0d0d0ffe0d0d0ff ,
+                        0xe0d0d0ffe0d0d0ffe0d0d0ffe0d0d0fffff8f0ffe0e0e0ff905830ff905840ff ,
+                        0xe0c8c0a000000000c0b0a0fffffffffffff8fffffff8f0fffff8f0fffff8f0ff ,
+                        0xfff8f0fffff8f0fffff8f0fffff8f0fffff8f0ffe0e0e0ffb06030ffc06830ff ,
+                        0x905840ffc0907040c0b8a0ffffffffffe0d0d0ffe0d0d0ffe0d0d0ffe0d0d0ff ,
+                        0xe0d0d0ffe0d0d0ffe0d0d0ffe0d0d0fffff8f0ffe0e0e0fff0a880ffe08050ff ,
+                        0xc06030ff905840ffc0b8a0fffffffffffffffffffffffffffff8fffffff8ffff ,
+                        0xfff8f0fffff8f0fffff8f0fffff8f0fffff8ffffe0e0e0ffffa880ffffb890ff ,
+                        0xa07050ffc0907020d0b8b0ffffffffffe0d0d0ffe0d0d0ffe0d0d0ffe0d0d0ff ,
+                        0xe0d0d0ffe0d0d0ffe0d0d0ffe0d0d0fffff8fffff0e8e0ffc08060ffb07860ff ,
+                        0xf0e0e09000000000d0b8b0ffffffffffffffffffffffffffffffffffffffffff ,
+                        0xfff8fffffff8fffffff8f0fffff8f0fffff8ffffd0d0d0ffc09070fff0d8d080 ,
+                        0xffffff2000000000d0b8b0ffffffffffe0d0d0ffe0d0d0ffe0d0d0ffe0d0d0ff ,
+                        0xe0d0d0ffe0d0d0ffe0d0d0ffe0d0d0fffff8ffffb0a8a0ffffffff60ffffff20 ,
+                        0x0000000000000000d0b8b0ffffffffffffffffffffffffffffffffffffffffff ,
+                        0xfffffffffffffffffff8fffffff8fffffff8ffff908870ffffffff30ffffff10 ,
+                        0x0000000000000000d0b8b0ffd0b8b0ffd0b8b0ffd0b8b0ffd0b8b0ffd0b8b0ff ,
+                        0xd0b8a0ffd0b8a0ffc0b8a0ffc0b8a0ffc0b0a0ffc0b0a0ff0000000000000000 ,
+                        0x0000000000000000909090ffe0e0e0ff909090ffffffffff707070e0ffffffff ,
+                        0x808080ffffffffff808080ffffffffff707070ffd0c8c0ff0000000000000000 ,
+                        0x0000000000000000d0c8d0ff505050ffb0b8b0ff202820ff30283050202820ff ,
+                        0x30283040202820ff40404080202820ff40383060202820ff0000000000000000 ,
+                        0x0000000000000000
+                    End
+
+                    LayoutCachedLeft =5225
+                    LayoutCachedTop =793
+                    LayoutCachedWidth =6029
+                    LayoutCachedHeight =1532
+                    ForeTint =100.0
+                    Gradient =0
+                    BackColor =14277081
+                    BackThemeColorIndex =1
+                    BackTint =100.0
+                    BackShade =85.0
+                    BorderColor =14277081
+                    BorderThemeColorIndex =1
+                    BorderTint =100.0
+                    BorderShade =85.0
+                    ThemeFontIndex =-1
+                    HoverColor =-2147483633
+                    HoverThemeColorIndex =-1
+                    HoverTint =100.0
+                    PressedColor =-2147483633
+                    PressedThemeColorIndex =-1
+                    PressedShade =100.0
+                    HoverForeColor =5855577
+                    HoverForeTint =65.0
+                    PressedForeColor =-2147483633
+                    PressedForeThemeColorIndex =-1
+                    PressedForeTint =100.0
+                    Shadow =-1
+                    QuickStyle =22
+                    QuickStyleMask =-113
+                    WebImagePaddingTop =1
+                    Overlaps =1
+                End
+                Begin CommandButton
+                    OverlapFlags =223
+                    TextFontFamily =49
+                    Left =5225
+                    Top =2664
+                    Width =805
+                    Height =739
+                    FontSize =9
+                    TabIndex =8
+                    Name ="cmd_import"
+                    Caption ="Update from sources"
+                    OnClick ="[Event Procedure]"
+                    FontName ="Consolas"
+                    ControlTipText ="Run the OpenAccess import"
+                    LeftPadding =60
+                    RightPadding =75
+                    BottomPadding =120
+                    GridlineColor =10921638
+                    ImageData = Begin
+                        0x2800000010000000100000000100200000000000000000000000000000000000 ,
+                        0x0000000000000000000000ff000000ff00000000000000ff000000ff00000000 ,
+                        0x000000ff000000ff000000000000000000000000000000000000000000000000 ,
+                        0x0000000000000000000000ff000000ff00000000000000ff000000ff00000000 ,
+                        0x000000ff000000ff000000000000000000000000000000000000000000000000 ,
+                        0x0000000000000000000000000000000000000000000000000000000000000000 ,
+                        0x0000000000000000000000000000000000000000000000000000000000000020 ,
+                        0x000000ff0000005000000000000000000000000000000000c0585080000000ff ,
+                        0x00000030000000000000000000000000000000000000000000000020000000ff ,
+                        0x808080ff000000ffc0585080000000ff0000003000000000c06050ffffc0c0ff ,
+                        0x000000ff0000000000000000000000000000000000000020000000ff808080ff ,
+                        0x000000ff00000010c06050ffffc0c0ff000000ff00000000e07070a0c06050ff ,
+                        0xc060605000000000000000000000000000000020000000ff808080ff000000ff ,
+                        0x0000001000000000e07070a0c06050ffc06060500000000000000000b0a090ff ,
+                        0x604830ff604830ff604830ff604030ff000000ff808080ff000000ff604830ff ,
+                        0x604830ff604830ff0000000000000000000000000000000000000000c0a890ff ,
+                        0xfffffffff0e8e0ffd0d0d0ff000000ff808080ff000000ffe0d0c0fff0d0c0ff ,
+                        0xf0d0c0ff604830ff0000000000000000c0585080000000ff00000030c0a8a0ff ,
+                        0xffffffffe0e0e0ff000000ff808080ff000000ff907060ff907060ff806860ff ,
+                        0xf0d0c0ff604830ff0000000000000000c06050ffffc0c0ff000000ffc0a8a0ff ,
+                        0xe0e0e0ff000000ff40d8f0ff000000ffb08870ffe0d8d0fff0f0e0ff806860ff ,
+                        0xf0d0c0ff604830ff0000000000000000e07070a0c06050ffc0606050b09890ff ,
+                        0x000000ff40d8f0ff000000fff0f8f0ffc09080ffb08870ff907860ff807060ff ,
+                        0xf0d8c0ff604830ff0000000000000000000000000000000000000000000000ff ,
+                        0xf0f8f0ff000000fff0f8f0fffffffffffffffffffff8f0fffff0f0fffff0e0ff ,
+                        0xf0d8d0ff604830ff0000000000000000000000000000000000000000c0a8a0ff ,
+                        0x000000ffb09080ffb08870ffffffffffc09080ffb08870ff907860ff807060ff ,
+                        0xf0d8d0ff604830ff0000000000000000000000000000000000000000d0b8a0ff ,
+                        0xfffffffffffffffffffffffffffffffffffffffffffffffffff8f0fffff8f0ff ,
+                        0xfff8f0ff604830ff0000000000000000000000000000000000000000b090e0ff ,
+                        0x7040a0ff6038a0ff6038a0ff603890ff603890ff603890ff603890ff603890ff ,
+                        0x603890ff603890ff0000000000000000000000000000000000000000b090e0ff ,
+                        0xb090d0ffa088d0ffa080d0ffa078d0ff9078d0ff9068c0ff8058b0ff7048b0ff ,
+                        0x7048b0ff7048b0ff
+                    End
+
+                    LayoutCachedLeft =5225
+                    LayoutCachedTop =2664
+                    LayoutCachedWidth =6030
+                    LayoutCachedHeight =3403
+                    ForeTint =100.0
+                    Gradient =0
+                    BackColor =14277081
+                    BackThemeColorIndex =1
+                    BackTint =100.0
+                    BackShade =85.0
+                    BorderColor =14277081
+                    BorderThemeColorIndex =1
+                    BorderTint =100.0
+                    BorderShade =85.0
+                    ThemeFontIndex =-1
+                    HoverColor =-2147483633
+                    HoverThemeColorIndex =-1
+                    HoverTint =100.0
+                    PressedColor =-2147483633
+                    PressedThemeColorIndex =-1
+                    PressedShade =100.0
+                    HoverForeColor =5855577
+                    HoverForeTint =65.0
+                    PressedForeColor =-2147483633
+                    PressedForeThemeColorIndex =-1
+                    PressedForeTint =100.0
+                    Shadow =-1
+                    QuickStyle =22
+                    QuickStyleMask =-113
+                    WebImagePaddingTop =1
+                    Overlaps =1
+                End
+                Begin Label
+                    FontItalic = NotDefault
+                    BackStyle =1
+                    OverlapFlags =93
+                    TextFontFamily =49
+                    Left =283
+                    Top =5102
+                    Width =6187
+                    Height =223
+                    FontSize =8
+                    BorderColor =8355711
+                    ForeColor =8355711
+                    Name ="lbl_log_path"
+                    Caption ="C:\\...\\Log"
+                    FontName ="Consolas"
+                    GridlineColor =10921638
+                    LayoutCachedLeft =283
+                    LayoutCachedTop =5102
+                    LayoutCachedWidth =6470
+                    LayoutCachedHeight =5325
+                    ThemeFontIndex =-1
+                End
+                Begin CommandButton
+                    OverlapFlags =87
+                    TextFontFamily =49
+                    Left =5442
+                    Top =4762
+                    Width =397
+                    FontSize =9
+                    TabIndex =9
+                    Name ="cmd_open_log"
+                    Caption ="Commande8"
+                    OnClick ="[Event Procedure]"
+                    FontName ="Consolas"
+                    ObjectPalette = Begin
+                        0x000301000000000000000000
+                    End
+                    ControlTipText ="Open the log file with your default text editor"
+                    LeftPadding =60
+                    RightPadding =75
+                    BottomPadding =120
+                    GridlineColor =10921638
+                    ImageData = Begin
+                        0x2800000010000000100000000100200000000000000000000000000000000000 ,
+                        0x0000000000000000000000000000000000000000000000000000000000000000 ,
+                        0x000000000000000000000000000000000000000030506050204860ff303040ff ,
+                        0x3040505000000000000000000000000000000000000000000000000000000000 ,
+                        0x0000000000000000000000000000000030506050305060ff4088a0ff3090b0ff ,
+                        0x304050ff50809040000000000000000000000000000000000000000000000000 ,
+                        0x00000000000000000000000030506050305060ff3088b0ff40b8e0ff90e0f0ff ,
+                        0x90d0e0ff6090a0ff0000000000000000000000006068602060606070606060b0 ,
+                        0x606060f0505850f0505850b0405050c03080a0ff40b8e0ff90e0f0ff90e0f0ff ,
+                        0x6098b0ff6088a050000000000000000070707040707060b0a09090ffc0b0a0ff ,
+                        0xe0c8b0ffe0c8b0ffc0a8a0ff908080ff505850b080c0d0ffa0d8f0ff6098b0ff ,
+                        0x6088a050000000000000000080787020707870b0b0b0b0ffffe8e0ffffe0d0ff ,
+                        0xf0e0d0fff0d8c0fff0d0c0fff0d0b0ffb09890ff505850c0608890ff6088a050 ,
+                        0x00000000000000000000000080787070b0a8a0fffff8f0fffff0e0ffffe8e0ff ,
+                        0xffe8e0ffffe0d0fff0d8d0fff0d8c0fff0d0c0ff908880ff50606080f0d8c000 ,
+                        0x000000000000000000000000808070b0d0d0d0fffff8fffffff8f0fffff0f0ff ,
+                        0xfff0e0ffffe8e0fff0e0d0fff0e0d0fff0d8c0ffc0b0a0ff605860c0f0d8c000 ,
+                        0x000000000000000000000000808080f0f0f0f0fffffffffffff8fffffff8f0ff ,
+                        0xfff0f0fffff0e0ffffe8e0fff0e0d0fff0d8d0ffe0c8b0ff606060f0f0d8c000 ,
+                        0x000000000000000000000000908080f0f0f0f0fffffffffffffffffffff8ffff ,
+                        0xfff8f0fffff0f0ffffe8e0ffffe8e0ffffe0d0fff0d0c0ff606060f000000000 ,
+                        0x000000000000000000000000908880b0e0d8d0ffffffffffffffffffffffffff ,
+                        0xfff8f0fffff8f0fffff0f0fffff0e0ffffe0d0ffd0b8b0ff606860c000000000 ,
+                        0x00000000000000000000000090888070b0b0b0ffffffffffffffffffffffffff ,
+                        0xfffffffffff8f0fffff8f0fffff0f0ffffe8e0ffa09890ff6068607000000000 ,
+                        0x00000000000000000000000090888020908880b0c0c0c0ffffffffffffffffff ,
+                        0xfffffffffffffffffff8fffffff8f0ffc0b8b0ff707070b07070702000000000 ,
+                        0x0000000000000000000000000000000090888040908880b0b0b0b0ffe0d8d0ff ,
+                        0xf0f0f0fff0f8f0ffd0d8d0ffb0a8a0ff807870b0807870400000000000000000 ,
+                        0x00000000000000000000000000000000000000009088802090888070908880b0 ,
+                        0x908880f0808080f0808080b08080707080787020000000000000000000000000 ,
+                        0x0000000000000000000000000000000000000000000000000000000000000000 ,
+                        0x0000000000000000000000000000000000000000000000000000000000000000 ,
+                        0x0000000000000000
+                    End
+
+                    LayoutCachedLeft =5442
+                    LayoutCachedTop =4762
+                    LayoutCachedWidth =5839
+                    LayoutCachedHeight =5045
+                    ForeTint =100.0
+                    Gradient =0
+                    BackColor =14277081
+                    BackThemeColorIndex =1
+                    BackTint =100.0
+                    BackShade =85.0
+                    BorderColor =14277081
+                    BorderThemeColorIndex =1
+                    BorderTint =100.0
+                    BorderShade =85.0
+                    ThemeFontIndex =-1
+                    HoverColor =-2147483633
+                    HoverThemeColorIndex =-1
+                    HoverTint =100.0
+                    PressedColor =-2147483633
+                    PressedThemeColorIndex =-1
+                    PressedShade =100.0
+                    HoverForeColor =5855577
+                    HoverForeTint =65.0
+                    PressedForeColor =-2147483633
+                    PressedForeThemeColorIndex =-1
+                    PressedForeTint =100.0
+                    Shadow =-1
+                    QuickStyle =22
+                    QuickStyleMask =-113
+                    WebImagePaddingTop =1
+                    Overlaps =1
+                End
+                Begin CommandButton
+                    OverlapFlags =87
+                    TextFontFamily =49
+                    Left =6009
+                    Top =4762
+                    Width =454
+                    FontSize =9
+                    TabIndex =10
+                    Name ="cmd_open_log_dir"
+                    Caption ="Commande9"
+                    OnClick ="[Event Procedure]"
+                    FontName ="Consolas"
+                    ControlTipText ="Open the log directory"
+                    LeftPadding =60
+                    RightPadding =75
+                    BottomPadding =120
+                    GridlineColor =10921638
+                    ImageData = Begin
+                        0x2800000010000000100000000100200000000000000000000000000000000000 ,
+                        0x0000000000000000000000000000000000000000000000000000000000000000 ,
+                        0x0000000000000000000000000000000000000000000000000000000000000000 ,
+                        0x0000000000000000708890ff608090ff607880ff507080ff506070ff405860ff ,
+                        0x404850ff303840ff203030ff202030ff101820ff101010ff101020ff00000000 ,
+                        0x0000000000000000708890ff90a0b0ff70b0d0ff0090d0ff0090d0ff0090d0ff ,
+                        0x0090c0ff1088c0ff1080b0ff1080b0ff2078a0ff207090ff204860ff20303050 ,
+                        0x0000000000000000808890ff80c0d0ff90a8b0ff80e0ffff60d0ffff50c8ffff ,
+                        0x50c8ffff40c0f0ff30b0f0ff30a8f0ff20a0e0ff1090d0ff206880ff202830b0 ,
+                        0x00000000000000008090a0ff80d0f0ff90a8b0ff90c0d0ff70d8ffff60d0ffff ,
+                        0x60d0ffff50c8ffff50c0ffff40b8f0ff30b0f0ff30a8f0ff1088d0ff204860ff ,
+                        0x10283020000000008090a0ff80d8f0ff80c8e0ff90a8b0ff80e0ffff70d0ffff ,
+                        0x60d8ffff60d0ffff60d0ffff50c8ffff40c0f0ff40b8f0ff30b0f0ff206880ff ,
+                        0x10486090000000008098a0ff90e0f0ff90e0ffff90a8b0ff90b8c0ff70d8ffff ,
+                        0x60d8ffff60d8ffff60d8ffff60d0ffff50d0ffff50c8ffff40b8f0ff30a0e0ff ,
+                        0x406070f0506070308098a0ff90e0f0ffa0e8ffff80c8e0ff90a8b0ff80e0ffff ,
+                        0x80e0ffff80e0ffff80e0ffff80e0ffff80e0ffff80e0ffff70d8ffff70d8ffff ,
+                        0x50a8d0ff506070a090a0a0ffa0e8f0ffa0e8ffffa0e8ffff90b0c0ff90b0c0ff ,
+                        0x90a8b0ff90a8b0ff80a0b0ff80a0b0ff8098a0ff8098a0ff8090a0ff8090a0ff ,
+                        0x808890ff708890ff90a0b0ffa0e8f0ffa0f0ffffa0e8ffffa0e8ffff80d8ffff ,
+                        0x60d8ffff60d8ffff60d8ffff60d8ffff60d8ffff60d8ffff708890ff00000000 ,
+                        0x000000000000000090a0b0ffa0f0f0ffb0f0f0ffa0f0ffffa0e8ffffa0e8ffff ,
+                        0x70d8ffff90a0a0ff8098a0ff8098a0ff8090a0ff809090ff708890ff00000000 ,
+                        0x000000000000000090a8b0ffa0d0e0ffb0f0f0ffb0f0f0ffa0f0ffffa0e8ffff ,
+                        0x90a0b0ff80a8b0800000000000000000000000000000000000000000906850ff ,
+                        0x906850ff906850ff90a8b05090a8b0ff90a8b0ff90a8b0ff90a8b0ff90a8b0ff ,
+                        0x90a8b090000000000000000000000000000000000000000000000000a0787050 ,
+                        0x906850ff906850ff000000000000000000000000000000000000000000000000 ,
+                        0x000000000000000000000000907860ff9068506000000000a0787010a09080ff ,
+                        0xa0887050907860ff000000000000000000000000000000000000000000000000 ,
+                        0x000000000000000000000000a0988040a09080ffa08880ffb09880ffa0908080 ,
+                        0x0000000000000000000000000000000000000000000000000000000000000000 ,
+                        0x0000000000000000000000000000000000000000000000000000000000000000 ,
+                        0x0000000000000000
+                    End
+
+                    LayoutCachedLeft =6009
+                    LayoutCachedTop =4762
+                    LayoutCachedWidth =6463
+                    LayoutCachedHeight =5045
+                    ForeTint =100.0
+                    Gradient =0
+                    BackColor =14277081
+                    BackThemeColorIndex =1
+                    BackTint =100.0
+                    BackShade =85.0
+                    BorderColor =14277081
+                    BorderThemeColorIndex =1
+                    BorderTint =100.0
+                    BorderShade =85.0
+                    ThemeFontIndex =-1
+                    HoverColor =-2147483633
+                    HoverThemeColorIndex =-1
+                    HoverTint =100.0
+                    PressedColor =-2147483633
+                    PressedThemeColorIndex =-1
+                    PressedShade =100.0
+                    HoverForeColor =5855577
+                    HoverForeTint =65.0
+                    PressedForeColor =-2147483633
+                    PressedForeThemeColorIndex =-1
+                    PressedForeTint =100.0
+                    Shadow =-1
+                    QuickStyle =22
+                    QuickStyleMask =-113
+                    WebImagePaddingTop =1
+                    Overlaps =1
+                End
+                Begin Label
+                    BackStyle =1
+                    OverlapFlags =85
+                    TextFontFamily =49
+                    Left =285
+                    Top =4815
+                    Width =4170
+                    Height =225
+                    FontSize =9
+                    BorderColor =8355711
+                    ForeColor =8355711
+                    Name ="lbl_log_path_see"
+                    Caption ="See the log file for more informations:"
+                    FontName ="Consolas"
+                    GridlineColor =10921638
+                    LayoutCachedLeft =285
+                    LayoutCachedTop =4815
+                    LayoutCachedWidth =4455
+                    LayoutCachedHeight =5040
+                    ThemeFontIndex =-1
+                End
+                Begin CheckBox
+                    OverlapFlags =85
+                    Left =283
+                    Top =5452
+                    Width =226
+                    Height =224
+                    TabIndex =11
+                    BorderColor =10921638
+                    Name ="chk_debug_mode"
+                    DefaultValue ="True"
+                    ControlTipText ="Activate debug mode (log file more verbose)"
+                    GridlineColor =10921638
+
+                    LayoutCachedLeft =283
+                    LayoutCachedTop =5452
+                    LayoutCachedWidth =509
+                    LayoutCachedHeight =5676
+                    Begin
+                        Begin Label
+                            BackStyle =1
+                            OverlapFlags =85
+                            TextFontFamily =49
+                            Left =558
+                            Top =5442
+                            Width =1155
+                            Height =270
+                            FontSize =9
+                            BorderColor =8355711
+                            ForeColor =8355711
+                            Name ="lbl_debug_mode"
+                            Caption ="Debug Mode"
+                            FontName ="Consolas"
+                            GridlineColor =10921638
+                            LayoutCachedLeft =558
+                            LayoutCachedTop =5442
+                            LayoutCachedWidth =1713
+                            LayoutCachedHeight =5712
+                            ThemeFontIndex =-1
+                        End
+                    End
+                End
+                Begin Label
+                    Visible = NotDefault
+                    BackStyle =1
+                    OverlapFlags =85
+                    TextAlign =2
+                    TextFontFamily =49
+                    Left =283
+                    Top =4195
+                    Width =6111
+                    Height =284
+                    FontSize =9
+                    FontWeight =700
+                    BorderColor =8355711
+                    Name ="lbl_progression_msg"
+                    Caption ="Running..."
+                    FontName ="Consolas"
+                    GridlineColor =10921638
+                    LayoutCachedLeft =283
+                    LayoutCachedTop =4195
+                    LayoutCachedWidth =6394
+                    LayoutCachedHeight =4479
+                    ThemeFontIndex =-1
+                    ForeTint =100.0
+                End
+                Begin Label
+                    BackStyle =1
+                    OverlapFlags =223
+                    TextFontFamily =49
+                    Left =396
+                    Top =1587
+                    Width =1995
+                    Height =285
+                    FontSize =9
+                    BorderColor =8355711
+                    Name ="lbl_include_tables"
+                    Caption ="Include data from:"
+                    FontName ="Consolas"
+                    GridlineColor =10921638
+                    LayoutCachedLeft =396
+                    LayoutCachedTop =1587
+                    LayoutCachedWidth =2391
+                    LayoutCachedHeight =1872
+                    ThemeFontIndex =-1
+                    ForeTint =100.0
+                End
+                Begin TextBox
+                    Locked = NotDefault
+                    OldBorderStyle =4
+                    OverlapFlags =215
+                    TextFontFamily =49
+                    BorderLineStyle =3
+                    IMESentenceMode =3
+                    Left =396
+                    Top =1871
+                    Width =4082
+                    Height =270
+                    FontSize =9
+                    TabIndex =4
+                    BorderColor =8355711
+                    ForeColor =8355711
+                    Name ="txt_include_tables"
+                    FontName ="Consolas"
+                    GridlineColor =10921638
+
+                    LayoutCachedLeft =396
+                    LayoutCachedTop =1871
+                    LayoutCachedWidth =4478
+                    LayoutCachedHeight =2141
+                    BorderThemeColorIndex =0
+                    BorderTint =50.0
+                    BorderShade =100.0
+                    ThemeFontIndex =-1
+                    ForeTint =50.0
+                End
+                Begin CommandButton
+                    OverlapFlags =215
+                    TextFontFamily =49
+                    Left =4601
+                    Top =1866
+                    Width =280
+                    Height =235
+                    FontSize =9
+                    TabIndex =5
+                    Name ="cmd_see_include_tables"
+                    Caption ="+"
+                    FontName ="Consolas"
+                    LeftPadding =60
+                    RightPadding =75
+                    BottomPadding =120
+                    GridlineColor =10921638
+
+                    LayoutCachedLeft =4601
+                    LayoutCachedTop =1866
+                    LayoutCachedWidth =4881
+                    LayoutCachedHeight =2101
+                    ForeTint =100.0
+                    Gradient =0
+                    BackColor =14277081
+                    BackThemeColorIndex =1
+                    BackTint =100.0
+                    BackShade =85.0
+                    BorderColor =14277081
+                    BorderThemeColorIndex =1
+                    BorderTint =100.0
+                    BorderShade =85.0
+                    ThemeFontIndex =-1
+                    HoverColor =-2147483633
+                    HoverThemeColorIndex =-1
+                    HoverTint =100.0
+                    PressedColor =-2147483633
+                    PressedThemeColorIndex =-1
+                    PressedShade =100.0
+                    HoverForeColor =5855577
+                    HoverForeTint =65.0
+                    PressedForeColor =-2147483633
+                    PressedForeThemeColorIndex =-1
+                    PressedForeTint =100.0
+                    Shadow =-1
+                    QuickStyle =22
+                    QuickStyleMask =-113
+                    WebImagePaddingTop =1
+                    Overlaps =1
+                End
+                Begin CheckBox
+                    OverlapFlags =215
+                    Left =453
+                    Top =1217
+                    Width =283
+                    Height =226
+                    TabIndex =3
+                    BorderColor =10921638
+                    Name ="chk_zip"
+                    DefaultValue ="True"
+                    GridlineColor =10921638
+
+                    LayoutCachedLeft =453
+                    LayoutCachedTop =1217
+                    LayoutCachedWidth =736
+                    LayoutCachedHeight =1443
+                    DatasheetCaption ="Compress a copy of the current project before exporting the sources"
+                    Begin
+                        Begin Label
+                            BackStyle =1
+                            OverlapFlags =215
+                            TextFontFamily =49
+                            Left =740
+                            Top =1190
+                            Width =1800
+                            Height =270
+                            FontSize =9
+                            BorderColor =8355711
+                            Name ="lbl_zip"
+                            Caption ="Zip the app file"
+                            FontName ="Consolas"
+                            GridlineColor =10921638
+                            LayoutCachedLeft =740
+                            LayoutCachedTop =1190
+                            LayoutCachedWidth =2540
+                            LayoutCachedHeight =1460
+                            ThemeFontIndex =-1
+                            ForeTint =100.0
+                        End
+                    End
+                End
+                Begin CheckBox
+                    OverlapFlags =215
+                    Left =453
+                    Top =884
+                    Width =283
+                    Height =226
+                    TabIndex =2
+                    BorderColor =10921638
+                    Name ="chk_optimizer"
+                    DefaultValue ="True"
+                    ControlTipText ="Exports only the tables defs, queries, forms, reports, macros and modules modifi"
+                        "ed since the last Open Access export"
+                    GridlineColor =10921638
+
+                    LayoutCachedLeft =453
+                    LayoutCachedTop =884
+                    LayoutCachedWidth =736
+                    LayoutCachedHeight =1110
+                    Begin
+                        Begin Label
+                            BackStyle =1
+                            OverlapFlags =215
+                            TextFontFamily =49
+                            Left =735
+                            Top =855
+                            Width =2700
+                            Height =270
+                            FontSize =9
+                            BorderColor =8355711
+                            Name ="lbl_optimizer"
+                            Caption ="Export newer objects only"
+                            FontName ="Consolas"
+                            GridlineColor =10921638
+                            LayoutCachedLeft =735
+                            LayoutCachedTop =855
+                            LayoutCachedWidth =3435
+                            LayoutCachedHeight =1125
+                            ThemeFontIndex =-1
+                            ForeTint =100.0
+                        End
+                    End
+                End
+                Begin CheckBox
+                    OverlapFlags =215
+                    Left =453
+                    Top =2861
+                    Width =283
+                    Height =226
+                    TabIndex =7
+                    BorderColor =10921638
+                    Name ="chk_backup"
+                    DefaultValue ="True"
+                    ControlTipText ="Create a backup of the current project before proceeding to the import"
+                    GridlineColor =10921638
+
+                    LayoutCachedLeft =453
+                    LayoutCachedTop =2861
+                    LayoutCachedWidth =736
+                    LayoutCachedHeight =3087
+                    Begin
+                        Begin Label
+                            BackStyle =1
+                            OverlapFlags =215
+                            TextFontFamily =49
+                            Left =735
+                            Top =2835
+                            Width =3015
+                            Height =270
+                            FontSize =9
+                            BorderColor =8355711
+                            Name ="lbl_backup"
+                            Caption ="Backup the app before import"
+                            FontName ="Consolas"
+                            GridlineColor =10921638
+                            LayoutCachedLeft =735
+                            LayoutCachedTop =2835
+                            LayoutCachedWidth =3750
+                            LayoutCachedHeight =3105
+                            ThemeFontIndex =-1
+                            ForeTint =100.0
+                        End
+                    End
+                End
+                Begin Label
+                    BackStyle =1
+                    OverlapFlags =215
+                    TextAlign =2
+                    TextFontFamily =49
+                    Left =5216
+                    Top =1643
+                    Width =794
+                    Height =226
+                    FontSize =9
+                    FontWeight =700
+                    BorderColor =8355711
+                    Name ="lbl_export"
+                    Caption ="Export"
+                    FontName ="Consolas"
+                    GridlineColor =10921638
+                    LayoutCachedLeft =5216
+                    LayoutCachedTop =1643
+                    LayoutCachedWidth =6010
+                    LayoutCachedHeight =1869
+                    ThemeFontIndex =-1
+                    ForeTint =100.0
+                End
+                Begin Label
+                    BackStyle =1
+                    OverlapFlags =215
+                    TextAlign =2
+                    TextFontFamily =49
+                    Left =5215
+                    Top =3517
+                    Width =825
+                    Height =225
+                    FontSize =9
+                    FontWeight =700
+                    BorderColor =8355711
+                    Name ="lbl_import"
+                    Caption ="Import"
+                    FontName ="Consolas"
+                    GridlineColor =10921638
+                    LayoutCachedLeft =5215
+                    LayoutCachedTop =3517
+                    LayoutCachedWidth =6040
+                    LayoutCachedHeight =3742
+                    ThemeFontIndex =-1
+                    ForeTint =100.0
+                End
+            End
+        End
+    End
+End
+CodeBehindForm
+Attribute VB_GlobalNameSpace = False
+Attribute VB_Creatable = True
+Attribute VB_PredeclaredId = True
+Attribute VB_Exposed = False
+Option Compare Database
+Dim RUNNING_OP As Boolean
+
+Private Sub cmd_export_Click()
+Dim optimizer, zip As Boolean
+Dim include_tables As String
+
+optimizer = Me.chk_optimizer
+zip = Me.chk_zip
+
+If Me.chk_debug_mode Then
+    OA_Log.set_debug_mode
+End If
+
+RUNNING_OP = True
+
+' update include_tables
+include_tables = Me.txt_include_tables
+
+' update log path
+logger "cmd_export_Click", "INFO", "Run Export"
+Me.lbl_log_path.Caption = OA_Log.log_file
+
+' update state
+Call update_state
+
+' start export
+Dim result As Variant
+result = make_sources(include_tables, optimizer, zip)
+
+' update state
+RUNNING_OP = False
+Call update_state
+
+'display result
+Call display_status(result)
+
+End Sub
+
+Private Sub cmd_import_Click()
+Dim backup As Boolean
+
+backup = Me.chk_backup
+
+If Me.chk_debug_mode Then
+    OA_Log.set_debug_mode
+End If
+
+RUNNING_OP = True
+
+' update log path
+logger "cmd_import_Click", "INFO", "Run Export"
+Me.lbl_log_path.Caption = OA_Log.log_file
+
+' update state
+Call update_state
+
+' start export
+Dim result As Variant
+result = update_from_sources(backup)
+
+' update state
+RUNNING_OP = False
+Call update_state
+
+'display result
+Call display_status(result)
+
+End Sub
+
+Private Sub cmd_open_log_Click()
+'open the current log file with the default text editor
+
+    Application.FollowHyperlink OA_Log.log_file()
+
+End Sub
+
+Private Sub cmd_open_log_dir_Click()
+'open the current log directory with file explorer
+
+    Shell "explorer.exe " & OA_Log.log_dir()
+
+End Sub
+
+Private Sub Form_Current()
+    Call update_state
+    
+    Me.lbl_log_path.Caption = OA_Log.log_dir
+    Me.txt_include_tables = get_include_tables()
+    
+End Sub
+
+Private Sub display_status(result As Variant)
+    On Error GoTo err
+    Dim msg As String
+    msg = "Operation ended with status: " & vbNewLine
+    
+    Select Case CInt(result)
+        Case opCompleted
+            msg = msg & "> Done"
+        Case opInterrupted
+            msg = msg & "> Interrupted"
+        Case opCancelled
+            msg = msg & "> Cancelled"
+        Case Else
+            GoTo err
+    End Select
+    
+    MsgBox msg, vbInformation, "Open Access"
+    
+    Exit Sub
+err:
+    MsgBox msg & "> (unable to read the returned status)", vbExclamation, "Open Access"
+End Sub
+
+Private Sub update_state()
+Dim control As control
+Dim enable As Boolean
+
+    Me.lbl_progression_msg.Visible = RUNNING_OP
+
+    For Each control In Me.Controls
+        If control.ControlType = acCheckBox Or _
+           control.ControlType = acCommandButton Or _
+           control.ControlType = acTextBox Then
+            
+            enable = (Not RUNNING_OP)
+           
+            If control.name = "cmd_open_log" Then
+                enable = enable And (Len(OA_Log.log_file) > 0)
+            End If
+
+            control.Enabled = enable
+            
+        End If
+    Next control
+    
+    DoCmd.Hourglass RUNNING_OP
+
+End Sub

+ 0 - 384
source/forms/frm_openaccess.bas

@@ -1,384 +0,0 @@
-Version =20
-VersionRequired =20
-Begin Form
-    AllowFilters = NotDefault
-    PopUp = NotDefault
-    Modal = NotDefault
-    RecordSelectors = NotDefault
-    MaxButton = NotDefault
-    MinButton = NotDefault
-    ShortcutMenu = NotDefault
-    AutoCenter = NotDefault
-    NavigationButtons = NotDefault
-    AllowDeletions = NotDefault
-    DividingLines = NotDefault
-    AllowAdditions = NotDefault
-    DefaultView =0
-    ScrollBars =0
-    ViewsAllowed =1
-    BorderStyle =1
-    PictureAlignment =2
-    DatasheetGridlinesBehavior =3
-    GridY =10
-    Width =8163
-    DatasheetFontHeight =11
-    ItemSuffix =20
-    Left =3060
-    Top =2055
-    Right =13650
-    Bottom =10335
-    DatasheetGridlinesColor =14806254
-    RecSrcDt = Begin
-        0x97e87bbff3d2e440
-    End
-    Caption ="OpenAccess"
-    DatasheetFontName ="Calibri"
-    OnLoad ="[Event Procedure]"
-    AllowDatasheetView =0
-    AllowPivotTableView =0
-    AllowPivotChartView =0
-    AllowPivotChartView =0
-    FilterOnLoad =0
-    ShowPageMargins =0
-    DisplayOnSharePointSite =1
-    AllowLayoutView =0
-    DatasheetAlternateBackColor =15921906
-    DatasheetGridlinesColor12 =0
-    FitToScreen =1
-    DatasheetBackThemeColorIndex =1
-    BorderThemeColorIndex =3
-    ThemeFontIndex =1
-    ForeThemeColorIndex =0
-    AlternateBackThemeColorIndex =1
-    AlternateBackShade =95.0
-    Begin
-        Begin Label
-            BackStyle =0
-            FontSize =11
-            FontName ="Calibri"
-            ThemeFontIndex =1
-            BackThemeColorIndex =1
-            BorderThemeColorIndex =0
-            BorderTint =50.0
-            ForeThemeColorIndex =0
-            ForeTint =50.0
-            GridlineThemeColorIndex =1
-            GridlineShade =65.0
-        End
-        Begin CommandButton
-            Width =1701
-            Height =283
-            FontSize =11
-            FontWeight =400
-            FontName ="Calibri"
-            ForeThemeColorIndex =0
-            ForeTint =75.0
-            GridlineThemeColorIndex =1
-            GridlineShade =65.0
-            UseTheme =1
-            Shape =1
-            Gradient =12
-            BackThemeColorIndex =4
-            BackTint =60.0
-            BorderLineStyle =0
-            BorderColor =16777215
-            BorderThemeColorIndex =4
-            BorderTint =60.0
-            ThemeFontIndex =1
-            HoverThemeColorIndex =4
-            HoverTint =40.0
-            PressedThemeColorIndex =4
-            PressedShade =75.0
-            HoverForeThemeColorIndex =0
-            HoverForeTint =75.0
-            PressedForeThemeColorIndex =0
-            PressedForeTint =75.0
-        End
-        Begin OptionGroup
-            SpecialEffect =3
-            BorderLineStyle =0
-            Width =1701
-            Height =1701
-            BackThemeColorIndex =1
-            BorderThemeColorIndex =1
-            BorderShade =65.0
-            GridlineThemeColorIndex =1
-            GridlineShade =65.0
-        End
-        Begin TextBox
-            AddColon = NotDefault
-            FELineBreak = NotDefault
-            BorderLineStyle =0
-            Width =1701
-            LabelX =-1701
-            FontSize =11
-            FontName ="Calibri"
-            AsianLineBreak =1
-            BackThemeColorIndex =1
-            BorderThemeColorIndex =1
-            BorderShade =65.0
-            ThemeFontIndex =1
-            ForeThemeColorIndex =0
-            ForeTint =75.0
-            GridlineThemeColorIndex =1
-            GridlineShade =65.0
-        End
-        Begin ComboBox
-            AddColon = NotDefault
-            BorderLineStyle =0
-            Width =1701
-            LabelX =-1701
-            FontSize =11
-            FontName ="Calibri"
-            AllowValueListEdits =1
-            InheritValueList =1
-            ThemeFontIndex =1
-            BackThemeColorIndex =1
-            BorderThemeColorIndex =1
-            BorderShade =65.0
-            ForeThemeColorIndex =2
-            ForeShade =50.0
-            GridlineThemeColorIndex =1
-            GridlineShade =65.0
-        End
-        Begin Section
-            CanGrow = NotDefault
-            Height =2437
-            Name ="Détail"
-            AlternateBackColor =15921906
-            AlternateBackThemeColorIndex =1
-            AlternateBackShade =95.0
-            BackThemeColorIndex =1
-            Begin
-                Begin Label
-                    OverlapFlags =85
-                    TextAlign =2
-                    TextFontFamily =49
-                    Left =165
-                    Top =60
-                    Width =7845
-                    Height =330
-                    FontSize =12
-                    FontWeight =700
-                    BorderColor =8355711
-                    ForeColor =8355711
-                    Name ="lbl_title"
-                    Caption ="OpenAccess - Generate your Source Code"
-                    FontName ="Consolas"
-                    GridlineColor =10921638
-                    LayoutCachedLeft =165
-                    LayoutCachedTop =60
-                    LayoutCachedWidth =8010
-                    LayoutCachedHeight =390
-                    ThemeFontIndex =-1
-                End
-                Begin ComboBox
-                    LimitToList = NotDefault
-                    OverlapFlags =85
-                    TextFontFamily =49
-                    IMESentenceMode =3
-                    ColumnCount =4
-                    Left =170
-                    Top =623
-                    Width =2828
-                    Height =390
-                    FontSize =10
-                    BorderColor =10921638
-                    ForeColor =4138256
-                    ColumnInfo ="\"\";\"\";\"\";\"\";\"\";\"\";\"\";\"\";\"10\";\"100\""
-                    Name ="cb_command"
-                    RowSourceType ="Table/Query"
-                    RowSource ="SELECT tbl_commands.cmd_name, tbl_commands.function, tbl_commands.description, t"
-                        "bl_commands.with_args FROM tbl_commands ORDER BY tbl_commands.order; "
-                    ColumnWidths ="5670;0;0;0"
-                    FontName ="Consolas"
-                    OnChange ="[Event Procedure]"
-                    GridlineColor =10921638
-                    AllowValueListEdits =0
-                    InheritValueList =0
-
-                    LayoutCachedLeft =170
-                    LayoutCachedTop =623
-                    LayoutCachedWidth =2998
-                    LayoutCachedHeight =1013
-                    ThemeFontIndex =-1
-                End
-                Begin CommandButton
-                    OverlapFlags =85
-                    TextFontFamily =49
-                    Left =7143
-                    Top =623
-                    Width =850
-                    Height =390
-                    TabIndex =2
-                    ForeColor =4210752
-                    Name ="cmd_run"
-                    Caption ="Run"
-                    OnClick ="[Event Procedure]"
-                    FontName ="Consolas"
-                    GridlineColor =10921638
-
-                    LayoutCachedLeft =7143
-                    LayoutCachedTop =623
-                    LayoutCachedWidth =7993
-                    LayoutCachedHeight =1013
-                    UseTheme =0
-                    BackColor =14136213
-                    BorderColor =14136213
-                    ThemeFontIndex =-1
-                    HoverColor =15060409
-                    PressedColor =9592887
-                    HoverForeColor =4210752
-                    PressedForeColor =4210752
-                    WebImagePaddingLeft =2
-                    WebImagePaddingTop =2
-                    WebImagePaddingRight =1
-                    WebImagePaddingBottom =1
-                    Overlaps =1
-                End
-                Begin Label
-                    OverlapFlags =85
-                    TextFontFamily =49
-                    Left =165
-                    Top =1185
-                    Width =7830
-                    Height =735
-                    FontSize =10
-                    BorderColor =8355711
-                    Name ="lbl_help"
-                    Caption ="Runs a git command"
-                    FontName ="Consolas"
-                    GridlineColor =10921638
-                    LayoutCachedLeft =165
-                    LayoutCachedTop =1185
-                    LayoutCachedWidth =7995
-                    LayoutCachedHeight =1920
-                    ThemeFontIndex =-1
-                    ForeTint =100.0
-                End
-                Begin Label
-                    FontItalic = NotDefault
-                    OverlapFlags =85
-                    TextAlign =3
-                    TextFontFamily =49
-                    Left =2040
-                    Top =2040
-                    Width =5949
-                    Height =223
-                    FontSize =8
-                    BorderColor =8355711
-                    Name ="Étiquette15"
-                    Caption ="Conseil départemental du Bas-Rhin, 2016"
-                    FontName ="Consolas"
-                    GridlineColor =10921638
-                    LayoutCachedLeft =2040
-                    LayoutCachedTop =2040
-                    LayoutCachedWidth =7989
-                    LayoutCachedHeight =2263
-                    ThemeFontIndex =-1
-                    ForeTint =100.0
-                End
-                Begin TextBox
-                    OverlapFlags =85
-                    TextFontFamily =49
-                    IMESentenceMode =3
-                    Left =3118
-                    Top =623
-                    Width =3860
-                    Height =390
-                    FontSize =10
-                    TabIndex =1
-                    BorderColor =10921638
-                    ForeColor =4138256
-                    Name ="txt_args"
-                    FontName ="Consolas"
-                    GridlineColor =10921638
-
-                    LayoutCachedLeft =3118
-                    LayoutCachedTop =623
-                    LayoutCachedWidth =6978
-                    LayoutCachedHeight =1013
-                    ThemeFontIndex =-1
-                    ForeThemeColorIndex =2
-                    ForeTint =100.0
-                    ForeShade =50.0
-                End
-            End
-        End
-    End
-End
-CodeBehindForm
-Attribute VB_GlobalNameSpace = False
-Attribute VB_Creatable = True
-Attribute VB_PredeclaredId = True
-Attribute VB_Exposed = False
-Option Compare Database
-
-
-
-Private Sub cb_command_Change()
-
-    Call update
-
-End Sub
-
-Private Sub cmd_run_Click()
-
-    Call run
-
-End Sub
-
-Private Sub Form_Load()
-
-    Call update
-
-End Sub
-
-Sub update()
-
-    Me.lbl_help.Caption = Nz(Me.cb_command.Column(2), "")
-
-    Me.txt_args.Enabled = Nz(Me.cb_command.Column(3), False)
-    
-    If Me.txt_args.Enabled Then
-        Me.txt_args.SetFocus
-    Else
-        Me.cmd_run.SetFocus
-    End If
-    
-End Sub
-
-Sub run()
-    Dim result As Variant
-
-    If Not Me.txt_args.Enabled Then
-        result = Application.run(Me.cb_command.Column(1))
-    Else
-        result = Application.run(Me.cb_command.Column(1), Nz(Me.txt_args, ""))
-    End If
-    
-    Call display_status(result)
-End Sub
-
-Private Sub display_status(result As Variant)
-    On Error GoTo err
-    Dim msg As String
-    msg = "Operation ended with status: " & vbNewLine
-    
-    Select Case CInt(result)
-        Case opCompleted
-            msg = msg & "> Done"
-        Case opInterrupted
-            msg = msg & "> Interrupted"
-        Case opCancelled
-            msg = msg & "> Cancelled"
-        Case Else
-            GoTo err
-    End Select
-    
-    MsgBox msg, vbInformation, "Open Access"
-    
-    Exit Sub
-err:
-    MsgBox msg & "> (unable to read the returned status)", vbExclamation, "Open Access"
-End Sub

+ 0 - 1
source/modules/OA_Controls.bas

@@ -1 +0,0 @@
-Option Compare Database

+ 21 - 15
source/modules/OA_Log.bas

@@ -4,7 +4,15 @@ Option Explicit
 Dim log_file_path As String
 Dim log_file_path As String
 Dim debug_level As Boolean
 Dim debug_level As Boolean
 
 
-Public Function log_file()
+Private Sub MkLogDir()
+    Call RecursiveMkDir(Environ("AppData") & "\OpenAccess\log\")
+End Sub
+
+Public Function log_dir() As String
+    log_dir = Environ("AppData") & "\OpenAccess\log\"
+End Function
+
+Public Function log_file() As String
     log_file = log_file_path
     log_file = log_file_path
 End Function
 End Function
 
 
@@ -13,45 +21,43 @@ Public Sub set_debug_mode()
 End Sub
 End Sub
 
 
 Public Sub logger(ByVal origin As String, ByVal level As String, ByVal msg As String)
 Public Sub logger(ByVal origin As String, ByVal level As String, ByVal msg As String)
-    Dim fso As Object
+    Dim FSO As Object
     Dim oFile As Object
     Dim oFile As Object
-    Dim line As String
+    Dim Line As String
     Dim new_session As Boolean
     Dim new_session As Boolean
     new_session = False
     new_session = False
     
     
     If level = "DEBUG" And Not debug_level = True Then Exit Sub
     If level = "DEBUG" And Not debug_level = True Then Exit Sub
 
 
-    Set fso = CreateObject("Scripting.FileSystemObject")
+    Set FSO = CreateObject("Scripting.FileSystemObject")
 
 
     If Not Len(log_file_path) > 0 Then
     If Not Len(log_file_path) > 0 Then
     
     
-        'log_file_path = CurrentProject.path & "\" & "openaccess.log"
-        
-        Call MkDirIfNotExist(Environ("AppData") & "\OpenAccess\")
+        Call MkLogDir
         
         
-        log_file_path = Environ("AppData") & "\OpenAccess\oa_" & Format(Now(), "yymmdd_hhMM") & ".log"
+        log_file_path = log_dir() & "oa_" & Format(Now(), "yymmdd_hhMM") & ".log"
         Debug.Print log_file_path
         Debug.Print log_file_path
         
         
         new_session = True
         new_session = True
         
         
-        If Not fso.FileExists(log_file_path) Then
-            Set oFile = fso.CreateTextFile(log_file_path)
+        If Not FSO.FileExists(log_file_path) Then
+            Set oFile = FSO.CreateTextFile(log_file_path)
             oFile.Close
             oFile.Close
         End If
         End If
         
         
     End If
     End If
 
 
-    Set oFile = fso.OpenTextFile(log_file_path, ForAppending)
+    Set oFile = FSO.OpenTextFile(log_file_path, ForAppending)
 
 
     If new_session Then oFile.WriteLine ("**********************************")
     If new_session Then oFile.WriteLine ("**********************************")
 
 
     'oFile.WriteBlankLines (2)
     'oFile.WriteBlankLines (2)
-    line = CStr(Now) + " - " + origin + " - " + level + " - " + msg
-    Debug.Print line
-    oFile.WriteLine (line)
+    Line = CStr(Now) + " - " + origin + " - " + level + " - " + msg
+    Debug.Print Line
+    oFile.WriteLine (Line)
 
 
     oFile.Close
     oFile.Close
-    Set fso = Nothing
+    Set FSO = Nothing
     Set oFile = Nothing
     Set oFile = Nothing
     
     
     If level = "CRITICAL" Then
     If level = "CRITICAL" Then

+ 43 - 41
source/modules/OA_Main.bas

@@ -5,7 +5,6 @@ Option Compare Database
 '* Main methods for OpenAccess add-in
 '* Main methods for OpenAccess add-in
 '*
 '*
 '****
 '****
-
 Public Const opInterrupted = 10
 Public Const opInterrupted = 10
 Public Const opCancelled = 11
 Public Const opCancelled = 11
 Public Const opCompleted = 12
 Public Const opCompleted = 12
@@ -13,23 +12,23 @@ Public Const opCompleted = 12
 '>> main function, called when addin is run
 '>> main function, called when addin is run
 Public Function main()
 Public Function main()
 
 
-    DoCmd.OpenForm "frm_openaccess"
+    DoCmd.OpenForm "OpenAccess"
 
 
 End Function
 End Function
 
 
-Public Function make_sources(Optional ByVal options As String = "") As Integer
+Public Function make_sources(ByVal include_tables As String, _
+                             Optional ByVal optimizer As Boolean = True, _
+                             Optional ByVal zip As Boolean = True) As Integer
 'exports the source-code of the app
 'exports the source-code of the app
 On Error GoTo err
 On Error GoTo err
 Dim step As String
 Dim step As String
 
 
     make_sources = opInterrupted
     make_sources = opInterrupted
     
     
-    If InStr(options, "-d") Then set_debug_mode
-    
     step = "Initialization"
     step = "Initialization"
     
     
     '*** If '-f' is not in the options: set the optimizer on
     '*** If '-f' is not in the options: set the optimizer on
-    If Not InStr(options, "-f") > 0 Then
+    If optimizer Then
         Dim msg As String
         Dim msg As String
         
         
         If get_sources_date() > #1/1/1900# Then
         If get_sources_date() > #1/1/1900# Then
@@ -63,16 +62,12 @@ Dim step As String
         logger "make_sources", "INFO", "Activates Optimizer"
         logger "make_sources", "INFO", "Activates Optimizer"
     End If
     End If
 
 
-
-    ' new sources date, before export so that date will be exported with tbl_vsc
-    step = "Updates sources date"
-    logger "make_sources", "INFO", step
-    Call update_sources_date
-
-    ' zip the app file
-    step = "Zip the app file"
-    logger "make_sources", "INFO", step
-    Call zip_app_file
+    If zip Then
+        ' zip the app file
+        step = "Zip the app file"
+        logger "make_sources", "INFO", step
+        Call zip_app_file
+    End If
     
     
     ' run the export
     ' run the export
     step = "Run VCS Export"
     step = "Run VCS Export"
@@ -88,10 +83,10 @@ Dim step As String
     Exit Function
     Exit Function
     
     
 err:
 err:
+    MsgBox "Unknown error - " & err.Description & " (#" & err.number & ")" & vbNewLine & "See the log file for more information", vbCritical, "CRITICAL ERROR"
     If err.number <> "60000" Then
     If err.number <> "60000" Then
-        logger "make_sources", "CRITICAL", "Unknown error at: " & step & " - " & err.Description & "(#" & err.number & ")"
+        logger "make_sources", "ERROR", "Unknown error at: " & step & " - " & err.Description & "(#" & err.number & ")"
     End If
     End If
-    MsgBox "Unknown error - " & err.Description & "(#" & err.number & ")", vbCritical, "CRITICAL ERROR"
     
     
     Call update_oa_param("sources_date", CStr(old_sources_date))
     Call update_oa_param("sources_date", CStr(old_sources_date))
     
     
@@ -102,23 +97,23 @@ cancelOp:
 End Function
 End Function
 
 
 
 
-Public Function update_from_sources(Optional ByVal options As String = "") As Integer
+Public Function update_from_sources(Optional ByVal backup As Boolean) As Integer
 'updates the application from the sources
 'updates the application from the sources
 
 
-    Dim backup As Boolean
+    Dim backup_ok As Boolean
     Dim step, msg As String
     Dim step, msg As String
     
     
     update_from_sources = opInterrupted
     update_from_sources = opInterrupted
-
-    If InStr(options, "-d") Then set_debug_mode
-
-    step = "Creates a backup of the app file"
-    logger "update_from_sources", "INFO", step
-    backup = make_backup()
     
     
-    If Not backup Then
-        logger "update_from_sources", "ERROR", "Error: unable to backup the app file, do it manually, then click OK"
-        MsgBox "Error: unable to backup the app file, do it manually, then click OK", vbExclamation, "Backup"
+    If backup Then
+        step = "Creates a backup of the app file"
+        logger "update_from_sources", "INFO", step
+        backup_ok = make_backup()
+    
+        If Not backup_ok Then
+            logger "update_from_sources", "ERROR", "Error: unable to backup the app file, do it manually, then click OK"
+            MsgBox "Error: unable to backup the app file, do it manually, then click OK", vbExclamation, "Backup"
+        End If
     End If
     End If
 
 
     step = "Check for unexported work"
     step = "Check for unexported work"
@@ -139,6 +134,13 @@ Public Function update_from_sources(Optional ByVal options As String = "") As In
     logger "update_from_sources", "INFO", step
     logger "update_from_sources", "INFO", step
     Call ImportAllSource
     Call ImportAllSource
    
    
+    step = "Cleaning obsolete objects in app"
+    msg = "Following objects do not exist in the sources, do you want to delete them?" & _
+          "" & CleanApp(True)
+    If MsgBox(msg, vbYesNo, "Cleaning" = vbYes) Then
+        Call CleanApp
+    End If
+   
     ' new sources date to keep the optimizer working
     ' new sources date to keep the optimizer working
     step = "Updates sources date"
     step = "Updates sources date"
     logger "update_from_sources", "INFO", step
     logger "update_from_sources", "INFO", step
@@ -147,10 +149,10 @@ Public Function update_from_sources(Optional ByVal options As String = "") As In
     update_from_sources = opCompleted
     update_from_sources = opCompleted
     Exit Function
     Exit Function
 err:
 err:
+    MsgBox "Unknown error - " & err.Description & " (#" & err.number & ")" & vbNewLine & "See the log file for more information", vbCritical, "CRITICAL ERROR"
     If err.number <> "60000" Then
     If err.number <> "60000" Then
         logger "update_from_sources", "CRITICAL", "Unknown error at: " & step & " - " & err.Description & "(#" & err.number & ")"
         logger "update_from_sources", "CRITICAL", "Unknown error at: " & step & " - " & err.Description & "(#" & err.number & ")"
     End If
     End If
-    MsgBox "Unknown error - " & err.Description & "(#" & err.number & ")", vbCritical, "CRITICAL ERROR"
     
     
     Exit Function
     Exit Function
 cancelOp:
 cancelOp:
@@ -168,27 +170,27 @@ Public Function zip_app_file() As Boolean
     shortname = Split(CurrentProject.name, ".")(0)
     shortname = Split(CurrentProject.name, ".")(0)
     
     
     'run the shell comand
     'run the shell comand
-    Call cmd("cd " & CurrentProject.path & " & " & _
+    Call cmd("cd " & CurrentProject.Path & " & " & _
              "zip tmp_" & shortname & ".zip " & CurrentProject.name & _
              "zip tmp_" & shortname & ".zip " & CurrentProject.name & _
              " & exit")
              " & exit")
     
     
     'remove the old zip file
     'remove the old zip file
-    If dir(CurrentProject.path & "\" & shortname & ".zip") <> "" Then
-        Kill CurrentProject.path & "\" & shortname & ".zip"
+    If dir(CurrentProject.Path & "\" & shortname & ".zip") <> "" Then
+        Kill CurrentProject.Path & "\" & shortname & ".zip"
     End If
     End If
     
     
     'rename the temporary zip
     'rename the temporary zip
-    Call cmd("cd " & CurrentProject.path & " & " & _
+    Call cmd("cd " & CurrentProject.Path & " & " & _
             "ren tmp_" & shortname & ".zip" & " " & shortname & ".zip" & _
             "ren tmp_" & shortname & ".zip" & " " & shortname & ".zip" & _
             " & exit")
             " & exit")
     
     
-    logger "zip_app_file", "INFO", CurrentProject.path & "\" & CurrentProject.name & " zipped to " & CurrentProject.path & "\" & shortname & ".zip"
+    logger "zip_app_file", "INFO", CurrentProject.Path & "\" & CurrentProject.name & " zipped to " & CurrentProject.Path & "\" & shortname & ".zip"
     zip_app_file = True
     zip_app_file = True
 
 
 end_:
 end_:
     Exit Function
     Exit Function
 UnknownErr:
 UnknownErr:
-    logger "zip_app_file", "ERROR", "Unable to zip " & CurrentProject.path & "\" & CurrentProject.name & " - " & err.Description
+    logger "zip_app_file", "ERROR", "Unable to zip " & CurrentProject.Path & "\" & CurrentProject.name & " - " & err.Description
     MsgBox "Unknown error: unable to ZIP the app file, do it manually"
     MsgBox "Unknown error: unable to ZIP the app file, do it manually"
     GoTo end_
     GoTo end_
 End Function
 End Function
@@ -197,14 +199,14 @@ Public Function make_backup() As Boolean
     On Error GoTo err
     On Error GoTo err
     
     
     make_backup = False
     make_backup = False
-    If dir(CurrentProject.path & "\" & CurrentProject.name & ".old") <> "" Then
-        Kill CurrentProject.path & "\" & CurrentProject.name & ".old"
+    If dir(CurrentProject.Path & "\" & CurrentProject.name & ".old") <> "" Then
+        Kill CurrentProject.Path & "\" & CurrentProject.name & ".old"
     End If
     End If
 
 
-    Call cmd("copy " & Chr(34) & CurrentProject.path & "\" & CurrentProject.name & Chr(34) & _
-             " " & Chr(34) & CurrentProject.path & "\" & CurrentProject.name & ".old" & Chr(34))
+    Call cmd("copy " & Chr(34) & CurrentProject.Path & "\" & CurrentProject.name & Chr(34) & _
+             " " & Chr(34) & CurrentProject.Path & "\" & CurrentProject.name & ".old" & Chr(34))
     
     
-    logger "make_backup", "INFO", CurrentProject.path & "\" & CurrentProject.name & " copied to " & CurrentProject.path & "\" & CurrentProject.name & ".old"
+    logger "make_backup", "INFO", CurrentProject.Path & "\" & CurrentProject.name & " copied to " & CurrentProject.Path & "\" & CurrentProject.name & ".old"
     
     
     make_backup = True
     make_backup = True
     Exit Function
     Exit Function

+ 4 - 4
source/modules/OA_Optimizer.bas

@@ -50,9 +50,9 @@ Public Function get_last_update_date(ByVal acType As Integer, ByVal name As Stri
     Select Case acType
     Select Case acType
         'case table or query: get [DateUpdate] in MSysObjects
         'case table or query: get [DateUpdate] in MSysObjects
         Case acTable
         Case acTable
-            get_last_update_date = DFirst("DateUpdate", "MSysObjects", "([Type]=1 or [Type]=4 or [Type]=6) and [name]='" & name & "'")
+            get_last_update_date = DFirst("DateUpdate", "MSysObjects", "([Type]=1 or [Type]=4 or [Type]=6) and [name]=" & Chr(34) & name & Chr(34) & "")
         Case acQuery
         Case acQuery
-            get_last_update_date = DFirst("DateUpdate", "MSysObjects", "[Type]=5 and [name]='" & name & "'")
+            get_last_update_date = DFirst("DateUpdate", "MSysObjects", "[Type]=5 and [name]=" & Chr(34) & name & Chr(34) & "")
         
         
         'MSysObjects is not reliable for other objects,
         'MSysObjects is not reliable for other objects,
         'So we used the DateModified property:
         'So we used the DateModified property:
@@ -217,12 +217,12 @@ Public Function CleanDirs(Optional ByVal sim As Boolean = False)
         For Each file In oFld.Files
         For Each file In oFld.Files
             objectname = remove_ext(file.name)
             objectname = remove_ext(file.name)
             objectname = to_accessname(objectname)
             objectname = to_accessname(objectname)
-            rsSys.FindFirst (msys_type_filter(obj_type_num) & " AND [name]='" & objectname & "'")
+            rsSys.FindFirst (msys_type_filter(obj_type_num) & " AND [name]=" & Chr(34) & objectname & Chr(34) & "")
             
             
             If rsSys.NoMatch Then
             If rsSys.NoMatch Then
                 'object doesn't exist anymore
                 'object doesn't exist anymore
                 If Len(CleanDirs) > 0 Then CleanDirs = CleanDirs & "|"
                 If Len(CleanDirs) > 0 Then CleanDirs = CleanDirs & "|"
-                short_path = Replace(file.path, CurrentProject.path, ".")
+                short_path = Replace(file.Path, CurrentProject.Path, ".")
                 CleanDirs = CleanDirs & short_path
                 CleanDirs = CleanDirs & short_path
                 
                 
                 If Not sim Then
                 If Not sim Then

+ 7 - 7
source/modules/OA_Properties.bas

@@ -16,7 +16,7 @@ Public Sub ExportProperties(daoObject As Object, file_path As String)
     VCS_Dir.MkDirIfNotExist Left$(file_path, InStrRev(file_path, "\"))
     VCS_Dir.MkDirIfNotExist Left$(file_path, InStrRev(file_path, "\"))
     
     
     Dim prp As Object
     Dim prp As Object
-    Dim prp_name, prp_value, line As String
+    Dim prp_name, prp_value, Line As String
     Dim prp_type As Integer
     Dim prp_type As Integer
     Dim count As Integer
     Dim count As Integer
     count = 0
     count = 0
@@ -37,8 +37,8 @@ Public Sub ExportProperties(daoObject As Object, file_path As String)
             prp_name = prp.name
             prp_name = prp.name
             prp_value = CStr(prp.value)
             prp_value = CStr(prp.value)
             
             
-            line = prp_name & vbTab & prp_value & vbTab & CStr(prp.Type)
-            objStream.WriteText line, adWriteLine
+            Line = prp_name & vbTab & prp_value & vbTab & CStr(prp.Type)
+            objStream.WriteText Line, adWriteLine
             count = count + 1
             count = count + 1
             
             
         End If
         End If
@@ -65,7 +65,7 @@ Public Sub ImportProperties(daoObject As Object, file_path As String)
 
 
     On Error GoTo err
     On Error GoTo err
     Dim splitted_line As Variant
     Dim splitted_line As Variant
-    Dim line, prp_name, prp_value As String
+    Dim Line, prp_name, prp_value As String
     Dim prp_type As Integer
     Dim prp_type As Integer
     Dim buffer As String
     Dim buffer As String
     Dim count As Integer
     Dim count As Integer
@@ -75,11 +75,11 @@ Public Sub ImportProperties(daoObject As Object, file_path As String)
     buffer = ReadFile(file_path, "x-ansi")
     buffer = ReadFile(file_path, "x-ansi")
     
     
     count = 0
     count = 0
-    For Each line In Split(buffer, vbNewLine)
-        If Len(line) = 0 Then Exit For
+    For Each Line In Split(buffer, vbNewLine)
+        If Len(Line) = 0 Then Exit For
         count = count + 1
         count = count + 1
         
         
-        splitted_line = Split(line, vbTab)
+        splitted_line = Split(Line, vbTab)
         prp_name = splitted_line(0)
         prp_name = splitted_line(0)
         prp_value = splitted_line(1)
         prp_value = splitted_line(1)
         prp_type = CInt(splitted_line(2))
         prp_type = CInt(splitted_line(2))

+ 1 - 1
source/modules/OA_Shell.bas

@@ -75,6 +75,6 @@ End Sub
 
 
 Public Function cmd(ByVal command As String, Optional WindowStyle As Long = vbHide, Optional in_dir As String = "")
 Public Function cmd(ByVal command As String, Optional WindowStyle As Long = vbHide, Optional in_dir As String = "")
 ' runs a comand with windows command line
 ' runs a comand with windows command line
-    If Len(in_dir) = 0 Then in_dir = CurrentProject.path
+    If Len(in_dir) = 0 Then in_dir = CurrentProject.Path
     Call ShellWait("cmd.exe /r cd " & in_dir & " & " & command, WindowStyle)
     Call ShellWait("cmd.exe /r cd " & in_dir & " & " & command, WindowStyle)
 End Function
 End Function

+ 15 - 9
source/modules/OA_Utils.bas

@@ -124,16 +124,16 @@ Public Function complete_gitignore()
     Dim keys() As String
     Dim keys() As String
     keys = Split("*.accdb;*.laccdb;*.mdb;*.ldb;*.accde;*.mde;*.accda", ";")
     keys = Split("*.accdb;*.laccdb;*.mdb;*.ldb;*.accde;*.mde;*.accda", ";")
     
     
-    gitignore_path = CurrentProject.path & "\.gitignore"
+    gitignore_path = CurrentProject.Path & "\.gitignore"
     
     
-    Dim fso As Object
-    Set fso = CreateObject("Scripting.FileSystemObject")
+    Dim FSO As Object
+    Set FSO = CreateObject("Scripting.FileSystemObject")
     
     
     Dim oFile As Object
     Dim oFile As Object
-    If Not fso.FileExists(gitignore_path) Then
-        Set oFile = fso.CreateTextFile(gitignore_path)
+    If Not FSO.FileExists(gitignore_path) Then
+        Set oFile = FSO.CreateTextFile(gitignore_path)
     Else
     Else
-        Set oFile = fso.OpenTextFile(gitignore_path, ForReading)
+        Set oFile = FSO.OpenTextFile(gitignore_path, ForReading)
         str_existing_keys = ""
         str_existing_keys = ""
         
         
         While Not oFile.AtEndOfStream
         While Not oFile.AtEndOfStream
@@ -149,7 +149,7 @@ Public Function complete_gitignore()
         Dim existing_keys() As String
         Dim existing_keys() As String
         existing_keys = Split(str_existing_keys, ";")
         existing_keys = Split(str_existing_keys, ";")
         
         
-        Set oFile = fso.OpenTextFile(gitignore_path, ForAppending)
+        Set oFile = FSO.OpenTextFile(gitignore_path, ForAppending)
     End If
     End If
     
     
     oFile.WriteBlankLines (2)
     oFile.WriteBlankLines (2)
@@ -163,7 +163,13 @@ Public Function complete_gitignore()
     oFile.WriteBlankLines (2)
     oFile.WriteBlankLines (2)
     
     
     oFile.Close
     oFile.Close
-    Set fso = Nothing
+    Set FSO = Nothing
     Set oFile = Nothing
     Set oFile = Nothing
 
 
-End Function
+End Function
+
+Public Sub SaveApp()
+
+
+
+End Sub

+ 123 - 16
source/modules/VCS_Dir.bas

@@ -1,12 +1,23 @@
 Option Compare Database
 Option Compare Database
-
 Option Private Module
 Option Private Module
 Option Explicit
 Option Explicit
 
 
+ Private Declare Function PathIsRelative Lib "Shlwapi" _
+        Alias "PathIsRelativeA" (ByVal Path As String) As Long
 
 
+    Public Enum EMakeDirStatus
+        ErrSuccess = 0
+        ErrRelativePath
+        ErrInvalidPathSpecification
+        ErrDirectoryCreateError
+        ErrSpecIsFileName
+        ErrInvalidCharactersInPath
+    End Enum
+    Const MAX_PATH = 260
+    
 ' Path/Directory of the current database file.
 ' Path/Directory of the current database file.
 Public Function ProjectPath() As String
 Public Function ProjectPath() As String
-    ProjectPath = CurrentProject.path
+    ProjectPath = CurrentProject.Path
     If Right$(ProjectPath, 1) <> "\" Then ProjectPath = ProjectPath & "\"
     If Right$(ProjectPath, 1) <> "\" Then ProjectPath = ProjectPath & "\"
 End Function
 End Function
 
 
@@ -16,25 +27,27 @@ Public Function SourcePath() As String
 End Function
 End Function
 
 
 ' Create folder `Path`. Silently do nothing if it already exists.
 ' Create folder `Path`. Silently do nothing if it already exists.
-Public Sub MkDirIfNotExist(ByVal path As String)
+Public Sub MkDirIfNotExist(ByVal Path As String)
     On Error GoTo MkDirIfNotexist_noop
     On Error GoTo MkDirIfNotexist_noop
-    MkDir path
-    logger "MkDirIfNotExist", "INFO", "New dir created: " & path
+    MkDir Path
+    logger "MkDirIfNotExist", "INFO", "New dir created: " & Path
 MkDirIfNotexist_noop:
 MkDirIfNotexist_noop:
     On Error GoTo 0
     On Error GoTo 0
 End Sub
 End Sub
 
 
+
+
 ' Delete a file if it exists.
 ' Delete a file if it exists.
-Public Sub DelIfExist(ByVal path As String)
+Public Sub DelIfExist(ByVal Path As String)
     On Error GoTo DelIfNotExist_Noop
     On Error GoTo DelIfNotExist_Noop
-    Kill path
-    logger "DelIfExist", "DEBUG", "Killed: " & path
+    Kill Path
+    logger "DelIfExist", "DEBUG", "Killed: " & Path
 DelIfNotExist_Noop:
 DelIfNotExist_Noop:
     On Error GoTo 0
     On Error GoTo 0
 End Sub
 End Sub
 
 
 ' Erase all *.`ext` files in `Path`.
 ' Erase all *.`ext` files in `Path`.
-Public Sub ClearTextFilesFromDir(ByVal path As String, ByVal Ext As String, Optional ByVal force As Boolean = False)
+Public Sub ClearTextFilesFromDir(ByVal Path As String, ByVal Ext As String, Optional ByVal force As Boolean = False)
     
     
     '### 13/10/2016: add optimizer
     '### 13/10/2016: add optimizer
     ' we don't want to clear the text files of the objects which will not be exported
     ' we don't want to clear the text files of the objects which will not be exported
@@ -45,15 +58,15 @@ Public Sub ClearTextFilesFromDir(ByVal path As String, ByVal Ext As String, Opti
     End If
     End If
     '###
     '###
     
     
-    logger "ClearTextFilesFromDir", "DEBUG", "Clear dir: " & path & "*." & Ext
+    logger "ClearTextFilesFromDir", "DEBUG", "Clear dir: " & Path & "*." & Ext
 
 
-    Dim fso As Object
-    Set fso = CreateObject("Scripting.FileSystemObject")
-    If Not fso.FolderExists(path) Then Exit Sub
+    Dim FSO As Object
+    Set FSO = CreateObject("Scripting.FileSystemObject")
+    If Not FSO.FolderExists(Path) Then Exit Sub
 
 
     On Error GoTo ClearTextFilesFromDir_noop
     On Error GoTo ClearTextFilesFromDir_noop
-    If dir$(path & "*." & Ext) <> vbNullString Then
-        fso.DeleteFile path & "*." & Ext
+    If dir$(Path & "*." & Ext) <> vbNullString Then
+        FSO.DeleteFile Path & "*." & Ext
     End If
     End If
     
     
 ClearTextFilesFromDir_noop:
 ClearTextFilesFromDir_noop:
@@ -70,4 +83,98 @@ Public Function FileExists(ByVal strPath As String) As Boolean
     On Error Resume Next
     On Error Resume Next
     FileExists = False
     FileExists = False
     FileExists = ((GetAttr(strPath) And vbDirectory) <> vbDirectory)
     FileExists = ((GetAttr(strPath) And vbDirectory) <> vbDirectory)
-End Function
+End Function
+
+
+
+    
+Function RecursiveMkDir(ByVal PathSpec As String) As EMakeDirStatus
+    ' This function creates a series of nested directories. The parent of
+    ' every directory is create before a subdirectory is created, allowing a
+    ' folder path specification of any number of directories (as long as the
+    ' total length is less than MAX_PATH.
+    
+    Dim FSO As Scripting.FileSystemObject
+    Dim DD As Scripting.Drive
+    Dim B As Boolean
+    Dim Root As String
+    Dim DirSpec As String
+    Dim N As Long
+    Dim M As Long
+    Dim S As String
+    Dim Directories() As String
+        
+    Set FSO = New Scripting.FileSystemObject
+        
+    ' ensure there are no invalid characters in spec.
+    On Error Resume Next
+    err.Clear
+    S = dir(PathSpec, vbNormal)
+    If err.number <> 0 Then
+        RecursiveMkDir = ErrInvalidCharactersInPath
+        Exit Function
+    End If
+    On Error GoTo 0
+    
+    ' ensure we have an absolute path
+    B = CBool(PathIsRelative(PathSpec))
+    If B = True Then
+        RecursiveMkDir = ErrRelativePath
+        Exit Function
+    End If
+    
+    ' if the directory already exists, get out with success.
+    If FSO.FolderExists(PathSpec) = True Then
+        RecursiveMkDir = ErrSuccess
+        Exit Function
+    End If
+    
+    ' get rid of trailing slash
+    If Right(PathSpec, 1) = "\" Then
+        PathSpec = Left(PathSpec, Len(PathSpec) - 1)
+    End If
+    
+    ' ensure we don't have a filename
+    N = InStrRev(PathSpec, "\")
+    M = InStrRev(PathSpec, ".")
+    If (N > 0) And (M > 0) Then
+        If M > N Then
+            ' period found after last slash
+            RecursiveMkDir = ErrSpecIsFileName
+            Exit Function
+        End If
+    End If
+    
+    If Left(PathSpec, 2) = "\\" Then
+        ' UNC -> \\Server\Share\Folder...
+        N = InStr(3, PathSpec, "\")
+        N = InStr(N + 1, PathSpec, "\")
+        Root = Left(PathSpec, N - 1)
+        DirSpec = Mid(PathSpec, N + 1)
+    Else
+        ' Local or mapped -> C:\Folder....
+        N = InStr(1, PathSpec, ":", vbBinaryCompare)
+        If N = 0 Then
+            RecursiveMkDir = ErrInvalidPathSpecification
+            Exit Function
+        End If
+        Root = Left(PathSpec, N)
+        DirSpec = Mid(PathSpec, N + 2)
+    End If
+    Set DD = FSO.GetDrive(Root)
+    Directories = Split(DirSpec, "\")
+    DirSpec = DD.Path
+    For N = LBound(Directories) To UBound(Directories)
+        DirSpec = DirSpec & "\" & Directories(N)
+        If FSO.FolderExists(DirSpec) = False Then
+            On Error Resume Next
+            err.Clear
+            FSO.CreateFolder (DirSpec)
+            If err.number <> 0 Then
+                RecursiveMkDir = ErrDirectoryCreateError
+                Exit Function
+            End If
+        End If
+    Next N
+    RecursiveMkDir = ErrSuccess
+    End Function

+ 5 - 5
source/modules/VCS_File.bas

@@ -108,8 +108,8 @@ Private Function BinRead(ByRef f As BinFile) As Integer
 End Function
 End Function
 
 
 ' Buffered write one byte at a time from a binary file.
 ' Buffered write one byte at a time from a binary file.
-Private Sub BinWrite(ByRef f As BinFile, b As Integer)
-    Mid(f.buffer, f.buffer_pos + 1, 1) = Chr$(b)
+Private Sub BinWrite(ByRef f As BinFile, B As Integer)
+    Mid(f.buffer, f.buffer_pos + 1, 1) = Chr$(B)
     f.buffer_pos = f.buffer_pos + 1
     f.buffer_pos = f.buffer_pos + 1
     If f.buffer_pos >= &H4000 Then
     If f.buffer_pos >= &H4000 Then
         Put f.file_num, , f.buffer
         Put f.file_num, , f.buffer
@@ -249,9 +249,9 @@ Public Function UsingUcs2() As Boolean
     End If
     End If
     Close fn
     Close fn
     
     
-    Dim fso As Object
-    Set fso = CreateObject("Scripting.FileSystemObject")
-    fso.DeleteFile (tempFileName)
+    Dim FSO As Object
+    Set FSO = CreateObject("Scripting.FileSystemObject")
+    FSO.DeleteFile (tempFileName)
 End Function
 End Function
 
 
 Public Function ReadFile(filepath As String, Optional encoding As String = "utf-8") As String
 Public Function ReadFile(filepath As String, Optional encoding As String = "utf-8") As String

+ 17 - 17
source/modules/VCS_IE_Functions.bas

@@ -28,9 +28,9 @@ Public Sub ExportObject(ByVal obj_type_num As Integer, ByVal obj_name As String,
         Application.SaveAsText obj_type_num, obj_name, tempFileName
         Application.SaveAsText obj_type_num, obj_name, tempFileName
         VCS_File.ConvertUcs2Utf8 tempFileName, file_path
         VCS_File.ConvertUcs2Utf8 tempFileName, file_path
 
 
-        Dim fso As Object
-        Set fso = CreateObject("Scripting.FileSystemObject")
-        fso.DeleteFile tempFileName
+        Dim FSO As Object
+        Set FSO = CreateObject("Scripting.FileSystemObject")
+        FSO.DeleteFile tempFileName
     Else
     Else
         Application.SaveAsText obj_type_num, obj_name, file_path
         Application.SaveAsText obj_type_num, obj_name, file_path
     End If
     End If
@@ -56,9 +56,9 @@ Public Sub ImportObject(ByVal obj_type_num As Integer, ByVal obj_name As String,
         
         
         Application.LoadFromText obj_type_num, obj_name, tempFileName
         Application.LoadFromText obj_type_num, obj_name, tempFileName
         
         
-        Dim fso As Object
-        Set fso = CreateObject("Scripting.FileSystemObject")
-        fso.DeleteFile tempFileName
+        Dim FSO As Object
+        Set FSO = CreateObject("Scripting.FileSystemObject")
+        FSO.DeleteFile tempFileName
     Else
     Else
         Application.LoadFromText obj_type_num, obj_name, file_path
         Application.LoadFromText obj_type_num, obj_name, file_path
     End If
     End If
@@ -76,10 +76,10 @@ End Sub
 ' unnecessary lines of VB code that are inserted automatically by the
 ' unnecessary lines of VB code that are inserted automatically by the
 ' Access GUI and change often (we don't want these lines of code in
 ' Access GUI and change often (we don't want these lines of code in
 ' version control).
 ' version control).
-Public Sub SanitizeTextFiles(ByVal path As String, ByVal Ext As String)
+Public Sub SanitizeTextFiles(ByVal Path As String, ByVal Ext As String)
 
 
-    Dim fso As Object
-    Set fso = CreateObject("Scripting.FileSystemObject")
+    Dim FSO As Object
+    Set FSO = CreateObject("Scripting.FileSystemObject")
     '
     '
     '  Setup Block matching Regex.
     '  Setup Block matching Regex.
     Dim rxBlock As Object
     Dim rxBlock As Object
@@ -115,7 +115,7 @@ Public Sub SanitizeTextFiles(ByVal path As String, ByVal Ext As String)
 'Debug.Print srchPattern
 'Debug.Print srchPattern
     rxLine.Pattern = srchPattern
     rxLine.Pattern = srchPattern
     Dim filename As String
     Dim filename As String
-    filename = dir$(path & "*." & Ext)
+    filename = dir$(Path & "*." & Ext)
     If Len(filename) = 0 Then
     If Len(filename) = 0 Then
         logger "SanitizeTextFiles", "INFO", "> No file to sanitized"
         logger "SanitizeTextFiles", "INFO", "> No file to sanitized"
         Exit Sub
         Exit Sub
@@ -130,9 +130,9 @@ Public Sub SanitizeTextFiles(ByVal path As String, ByVal Ext As String)
         obj_name = Mid$(filename, 1, InStrRev(filename, ".") - 1)
         obj_name = Mid$(filename, 1, InStrRev(filename, ".") - 1)
 
 
         Dim InFile As Object
         Dim InFile As Object
-        Set InFile = fso.OpenTextFile(path & obj_name & "." & Ext, iomode:=ForReading, create:=False, Format:=TristateFalse)
+        Set InFile = FSO.OpenTextFile(Path & obj_name & "." & Ext, iomode:=ForReading, create:=False, Format:=TristateFalse)
         Dim OutFile As Object
         Dim OutFile As Object
-        Set OutFile = fso.CreateTextFile(path & obj_name & ".sanitize", overwrite:=True, unicode:=False)
+        Set OutFile = FSO.CreateTextFile(Path & obj_name & ".sanitize", overwrite:=True, unicode:=False)
     
     
         Dim getLine As Boolean
         Dim getLine As Boolean
         getLine = True
         getLine = True
@@ -198,18 +198,18 @@ Public Sub SanitizeTextFiles(ByVal path As String, ByVal Ext As String)
         OutFile.Close
         OutFile.Close
         InFile.Close
         InFile.Close
 
 
-        fso.DeleteFile (path & filename)
+        FSO.DeleteFile (Path & filename)
 
 
         Dim thisFile As Object
         Dim thisFile As Object
-        Set thisFile = fso.GetFile(path & obj_name & ".sanitize")
-        thisFile.Move (path & filename)
+        Set thisFile = FSO.GetFile(Path & obj_name & ".sanitize")
+        thisFile.Move (Path & filename)
         
         
-        logger "SanitizeTextFiles", "DEBUG", "> File " & path & filename & " sanitized"
+        logger "SanitizeTextFiles", "DEBUG", "> File " & Path & filename & " sanitized"
 
 
         filename = dir$()
         filename = dir$()
     Loop
     Loop
 
 
-    logger "SanitizeTextFiles", "INFO", "> Files " & path & "*." & Ext & " sanitized"
+    logger "SanitizeTextFiles", "INFO", "> Files " & Path & "*." & Ext & " sanitized"
 
 
 End Sub
 End Sub
 
 

+ 26 - 10
source/modules/VCS_ImportExport.bas

@@ -1,5 +1,4 @@
 Option Compare Database
 Option Compare Database
-
 Option Explicit
 Option Explicit
 
 
 ' List of lookup tables that are part of the program rather than the
 ' List of lookup tables that are part of the program rather than the
@@ -77,6 +76,7 @@ Public Sub ExportAllSource()
     logger "ExportAllSource", "DEBUG", "Optimizer on: " & optimizer_activated()
     logger "ExportAllSource", "DEBUG", "Optimizer on: " & optimizer_activated()
     
     
     logger "ExportAllSource", "DEBUG", "Save project"
     logger "ExportAllSource", "DEBUG", "Save project"
+    
     CurrentProject.Application.RunCommand acCmdSave
     CurrentProject.Application.RunCommand acCmdSave
     
     
     Set Db = CurrentDb
     Set Db = CurrentDb
@@ -121,6 +121,8 @@ next_qry:
     Next
     Next
     logger "ExportAllSource", "INFO", "> " & obj_count & " queries exported"
     logger "ExportAllSource", "INFO", "> " & obj_count & " queries exported"
     
     
+    
+    Call SysCmd(4, "Sanitize queries")
     logger "ExportAllSource", "INFO", "Sanitize queries..."
     logger "ExportAllSource", "INFO", "Sanitize queries..."
     VCS_IE_Functions.SanitizeTextFiles obj_path, "bas"
     VCS_IE_Functions.SanitizeTextFiles obj_path, "bas"
         
         
@@ -149,6 +151,7 @@ next_qry:
             If optimizer_activated() Then
             If optimizer_activated() Then
                 If Not needs_export(obj_type_num, doc.name) > 0 Then
                 If Not needs_export(obj_type_num, doc.name) > 0 Then
                     obj_count = obj_count + 1
                     obj_count = obj_count + 1
+                    Call SysCmd(4, "Exporting " & obj_type_label & ": " & obj_count & " on " & Db.Containers(obj_type_name).Documents.count)
                     logger "ExportAllSource", "DEBUG", obj_type_label & " '" & doc.name & " skipped"
                     logger "ExportAllSource", "DEBUG", obj_type_label & " '" & doc.name & " skipped"
                     GoTo next_doc
                     GoTo next_doc
                 End If
                 End If
@@ -184,6 +187,7 @@ next_doc:
         
         
         logger "ExportAllSource", "INFO", "> " & obj_count & " " & obj_type_label & " exported"
         logger "ExportAllSource", "INFO", "> " & obj_count & " " & obj_type_label & " exported"
         
         
+        Call SysCmd(4, "Sanitize " & obj_type_label)
         If obj_type_label <> "modules" Then
         If obj_type_label <> "modules" Then
             logger "ExportAllSource", "INFO", "Sanitizing " & obj_type_label
             logger "ExportAllSource", "INFO", "Sanitizing " & obj_type_label
             VCS_IE_Functions.SanitizeTextFiles obj_path, "bas"
             VCS_IE_Functions.SanitizeTextFiles obj_path, "bas"
@@ -191,11 +195,12 @@ next_doc:
         
         
     Next
     Next
     
     
+    Call SysCmd(4, "Exporting references")
     VCS_Reference.ExportReferences source_path
     VCS_Reference.ExportReferences source_path
 
 
 '-------------------------table export------------------------
 '-------------------------table export------------------------
 
 
-
+    Call SysCmd(4, "Exporting tables")
     obj_path = source_path & "tables\"
     obj_path = source_path & "tables\"
     VCS_Dir.MkDirIfNotExist Left$(obj_path, InStrRev(obj_path, "\"))
     VCS_Dir.MkDirIfNotExist Left$(obj_path, InStrRev(obj_path, "\"))
     VCS_Dir.ClearTextFilesFromDir obj_path, "txt", True
     VCS_Dir.ClearTextFilesFromDir obj_path, "txt", True
@@ -292,13 +297,16 @@ next_td:
 
 
     Dim aRelation As DAO.Relation
     Dim aRelation As DAO.Relation
     
     
+    Call SysCmd(4, "Exporting relations")
     For Each aRelation In CurrentDb.Relations
     For Each aRelation In CurrentDb.Relations
         ' Exclude relations from system tables and inherited (linked) relations
         ' Exclude relations from system tables and inherited (linked) relations
         If Not (aRelation.name = "MSysNavPaneGroupsMSysNavPaneGroupToObjects" _
         If Not (aRelation.name = "MSysNavPaneGroupsMSysNavPaneGroupToObjects" _
                 Or aRelation.name = "MSysNavPaneGroupCategoriesMSysNavPaneGroups" _
                 Or aRelation.name = "MSysNavPaneGroupCategoriesMSysNavPaneGroups" _
                 Or (aRelation.Attributes And DAO.RelationAttributeEnum.dbRelationInherited) = _
                 Or (aRelation.Attributes And DAO.RelationAttributeEnum.dbRelationInherited) = _
                 DAO.RelationAttributeEnum.dbRelationInherited) Then
                 DAO.RelationAttributeEnum.dbRelationInherited) Then
-            VCS_Relation.ExportRelation aRelation, obj_path & aRelation.name & ".txt"
+                
+            VCS_Relation.ExportRelation aRelation, obj_path & to_filename(aRelation.name) & ".txt"
+            
             obj_count = obj_count + 1
             obj_count = obj_count + 1
         End If
         End If
     Next
     Next
@@ -320,7 +328,7 @@ End Sub
 ' macros, modules, and lookup tables from `source` folder under the
 ' macros, modules, and lookup tables from `source` folder under the
 ' database's folder.
 ' database's folder.
 Public Sub ImportAllSource()
 Public Sub ImportAllSource()
-    Dim fso As Object
+    Dim FSO As Object
     Dim source_path As String
     Dim source_path As String
     Dim obj_path As String
     Dim obj_path As String
     Dim obj_type As Variant
     Dim obj_type As Variant
@@ -335,13 +343,13 @@ Public Sub ImportAllSource()
     logger "ImportAllSource", "INFO", "Begin 'Import all sources'"
     logger "ImportAllSource", "INFO", "Begin 'Import all sources'"
     logger "ImportAllSource", "DEBUG", "Optimizer on: " & optimizer_activated()
     logger "ImportAllSource", "DEBUG", "Optimizer on: " & optimizer_activated()
     
     
-    Set fso = CreateObject("Scripting.FileSystemObject")
+    Set FSO = CreateObject("Scripting.FileSystemObject")
 
 
     CloseFormsReports
     CloseFormsReports
     'InitUsingUcs2
     'InitUsingUcs2
 
 
     source_path = VCS_Dir.ProjectPath() & "source\"
     source_path = VCS_Dir.ProjectPath() & "source\"
-    If Not fso.FolderExists(source_path) Then
+    If Not FSO.FolderExists(source_path) Then
         logger "ImportAllSource", "CRITICAL", "No source found at:" & source_path
         logger "ImportAllSource", "CRITICAL", "No source found at:" & source_path
     End If
     End If
 
 
@@ -624,14 +632,22 @@ Private Sub CloseFormsReports()
     On Error GoTo errorHandler
     On Error GoTo errorHandler
     logger "CloseFormsReports", "DEBUG", "Close any opened form or report"
     logger "CloseFormsReports", "DEBUG", "Close any opened form or report"
     
     
-    Do While Forms.count > 0
-        DoCmd.Close acForm, Forms(0).name
-        DoEvents
+    Dim threshold As Integer
+    threshold = 0
+    Do While Forms.count > threshold
+        If Forms(0).name = "OpenAccess" Then
+            threshold = 1
+        Else
+            DoCmd.Close acForm, Forms(threshold).name
+        End If
+        'DoEvents
     Loop
     Loop
     Do While Reports.count > 0
     Do While Reports.count > 0
         DoCmd.Close acReport, Reports(0).name
         DoCmd.Close acReport, Reports(0).name
-        DoEvents
+        'DoEvents
     Loop
     Loop
+    
+    DoEvents
     Exit Sub
     Exit Sub
 
 
 errorHandler:
 errorHandler:

+ 17 - 17
source/modules/VCS_Reference.bas

@@ -6,9 +6,9 @@ Option Explicit
 
 
 ' Import References from a CSV, true=SUCCESS
 ' Import References from a CSV, true=SUCCESS
 Public Function ImportReferences(ByVal obj_path As String) As Boolean
 Public Function ImportReferences(ByVal obj_path As String) As Boolean
-    Dim fso As Object
+    Dim FSO As Object
     Dim InFile As Object
     Dim InFile As Object
-    Dim line As String
+    Dim Line As String
     Dim item() As String
     Dim item() As String
     Dim GUID As String
     Dim GUID As String
     Dim Major As Long
     Dim Major As Long
@@ -22,13 +22,13 @@ Public Function ImportReferences(ByVal obj_path As String) As Boolean
         ImportReferences = False
         ImportReferences = False
         Exit Function
         Exit Function
     End If
     End If
-    Set fso = CreateObject("Scripting.FileSystemObject")
-    Set InFile = fso.OpenTextFile(obj_path & filename, iomode:=ForReading, create:=False, Format:=TristateFalse)
+    Set FSO = CreateObject("Scripting.FileSystemObject")
+    Set InFile = FSO.OpenTextFile(obj_path & filename, iomode:=ForReading, create:=False, Format:=TristateFalse)
     
     
 On Error GoTo failed_guid
 On Error GoTo failed_guid
     Do Until InFile.AtEndOfStream
     Do Until InFile.AtEndOfStream
-        line = InFile.readline
-        item = Split(line, ",")
+        Line = InFile.readline
+        item = Split(Line, ",")
         If UBound(item) = 2 Then 'a ref with a guid
         If UBound(item) = 2 Then 'a ref with a guid
           GUID = Trim$(item(0))
           GUID = Trim$(item(0))
           Major = CLng(item(1))
           Major = CLng(item(1))
@@ -45,7 +45,7 @@ go_on:
 On Error GoTo 0
 On Error GoTo 0
     InFile.Close
     InFile.Close
     Set InFile = Nothing
     Set InFile = Nothing
-    Set fso = Nothing
+    Set FSO = Nothing
     logger "ImportReferences", "INFO", count & " imported from " & filename
     logger "ImportReferences", "INFO", count & " imported from " & filename
     ImportReferences = True
     ImportReferences = True
     Exit Function
     Exit Function
@@ -63,27 +63,27 @@ End Function
 
 
 ' Export References to a CSV
 ' Export References to a CSV
 Public Sub ExportReferences(ByVal obj_path As String)
 Public Sub ExportReferences(ByVal obj_path As String)
-    Dim fso As Object
+    Dim FSO As Object
     Dim OutFile As Object
     Dim OutFile As Object
-    Dim line As String
+    Dim Line As String
     Dim ref As Reference
     Dim ref As Reference
     Dim count As Integer
     Dim count As Integer
     count = 0
     count = 0
     
     
-    Set fso = CreateObject("Scripting.FileSystemObject")
-    Set OutFile = fso.CreateTextFile(obj_path & "references.csv", overwrite:=True, unicode:=False)
+    Set FSO = CreateObject("Scripting.FileSystemObject")
+    Set OutFile = FSO.CreateTextFile(obj_path & "references.csv", overwrite:=True, unicode:=False)
     For Each ref In Application.References
     For Each ref In Application.References
         If ref.GUID <> vbNullString Then ' references of types mdb,accdb,mde etc don't have a GUID
         If ref.GUID <> vbNullString Then ' references of types mdb,accdb,mde etc don't have a GUID
             If Not ref.BuiltIn Then
             If Not ref.BuiltIn Then
-                line = ref.GUID & "," & CStr(ref.Major) & "," & CStr(ref.Minor)
-                OutFile.WriteLine line
-                logger "ExportReferences", "DEBUG", "> Reference " & line & " exported"
+                Line = ref.GUID & "," & CStr(ref.Major) & "," & CStr(ref.Minor)
+                OutFile.WriteLine Line
+                logger "ExportReferences", "DEBUG", "> Reference " & Line & " exported"
                 count = count + 1
                 count = count + 1
             End If
             End If
         Else
         Else
-            line = ref.FullPath
-            OutFile.WriteLine line
-            logger "ExportReferences", "DEBUG", "> Reference " & line & " exported"
+            Line = ref.FullPath
+            OutFile.WriteLine Line
+            logger "ExportReferences", "DEBUG", "> Reference " & Line & " exported"
             count = count + 1
             count = count + 1
         End If
         End If
     Next
     Next

+ 10 - 9
source/modules/VCS_Relation.bas

@@ -5,13 +5,12 @@ Option Explicit
 
 
 
 
 Public Sub ExportRelation(ByVal rel As DAO.Relation, ByVal filepath As String)
 Public Sub ExportRelation(ByVal rel As DAO.Relation, ByVal filepath As String)
-    Dim fso As Object
+    Dim FSO As Object
     Dim OutFile As Object
     Dim OutFile As Object
-    Set fso = CreateObject("Scripting.FileSystemObject")
-    Set OutFile = fso.CreateTextFile(filepath, overwrite:=True, unicode:=False)
-
+    Set FSO = CreateObject("Scripting.FileSystemObject")
+    
+    Set OutFile = FSO.CreateTextFile(filepath, overwrite:=True, unicode:=False)
     
     
-
     OutFile.WriteLine rel.Attributes 'RelationAttributeEnum
     OutFile.WriteLine rel.Attributes 'RelationAttributeEnum
     OutFile.WriteLine rel.name
     OutFile.WriteLine rel.name
     OutFile.WriteLine rel.table
     OutFile.WriteLine rel.table
@@ -32,10 +31,10 @@ Public Sub ExportRelation(ByVal rel As DAO.Relation, ByVal filepath As String)
 End Sub
 End Sub
 
 
 Public Sub ImportRelation(ByVal filepath As String)
 Public Sub ImportRelation(ByVal filepath As String)
-    Dim fso As Object
+    Dim FSO As Object
     Dim InFile As Object
     Dim InFile As Object
-    Set fso = CreateObject("Scripting.FileSystemObject")
-    Set InFile = fso.OpenTextFile(filepath, iomode:=ForReading, create:=False, Format:=TristateFalse)
+    Set FSO = CreateObject("Scripting.FileSystemObject")
+    Set InFile = FSO.OpenTextFile(filepath, iomode:=ForReading, create:=False, Format:=TristateFalse)
     Dim rel As DAO.Relation
     Dim rel As DAO.Relation
     Set rel = New DAO.Relation
     Set rel = New DAO.Relation
     
     
@@ -52,10 +51,12 @@ Public Sub ImportRelation(ByVal filepath As String)
             f.ForeignName = InFile.readline
             f.ForeignName = InFile.readline
             If "End" <> InFile.readline Then
             If "End" <> InFile.readline Then
                 Set f = Nothing
                 Set f = Nothing
-                err.Raise 40000, "ImportRelation", "Missing 'End' for a 'Begin' in " & filepath
+                logger "ImportRelation", "ERROR", "Missing 'End' for a 'Begin' in " & filepath
+                GoTo next_rel
             End If
             End If
             rel.Fields.Append f
             rel.Fields.Append f
         End If
         End If
+next_rel:
     Loop
     Loop
     
     
     InFile.Close
     InFile.Close

+ 6 - 6
source/modules/VCS_Report.bas

@@ -44,8 +44,8 @@ End Type
 'Exports print vars for reports
 'Exports print vars for reports
 Public Sub ExportPrintVars(ByVal obj_name As String, ByVal filepath As String)
 Public Sub ExportPrintVars(ByVal obj_name As String, ByVal filepath As String)
   DoEvents
   DoEvents
-  Dim fso As Object
-  Set fso = CreateObject("Scripting.FileSystemObject")
+  Dim FSO As Object
+  Set FSO = CreateObject("Scripting.FileSystemObject")
   
   
   Dim DevModeString As str_DEVMODE
   Dim DevModeString As str_DEVMODE
   Dim DevModeExtra As String
   Dim DevModeExtra As String
@@ -74,7 +74,7 @@ Public Sub ExportPrintVars(ByVal obj_name As String, ByVal filepath As String)
   End If
   End If
   
   
   Dim OutFile As Object
   Dim OutFile As Object
-  Set OutFile = fso.CreateTextFile(filepath, overwrite:=True, unicode:=False)
+  Set OutFile = FSO.CreateTextFile(filepath, overwrite:=True, unicode:=False)
   
   
   'print out print var values
   'print out print var values
   OutFile.WriteLine DM.intOrientation
   OutFile.WriteLine DM.intOrientation
@@ -93,8 +93,8 @@ End Sub
 
 
 Public Sub ImportPrintVars(ByVal obj_name As String, ByVal filepath As String)
 Public Sub ImportPrintVars(ByVal obj_name As String, ByVal filepath As String)
   On err GoTo err
   On err GoTo err
-  Dim fso As Object
-  Set fso = CreateObject("Scripting.FileSystemObject")
+  Dim FSO As Object
+  Set FSO = CreateObject("Scripting.FileSystemObject")
   
   
   Dim DevModeString As str_DEVMODE
   Dim DevModeString As str_DEVMODE
   Dim DevModeExtra As String
   Dim DevModeExtra As String
@@ -121,7 +121,7 @@ Public Sub ImportPrintVars(ByVal obj_name As String, ByVal filepath As String)
   End If
   End If
   
   
   Dim InFile As Object
   Dim InFile As Object
-  Set InFile = fso.OpenTextFile(filepath, iomode:=ForReading, create:=False, Format:=TristateFalse)
+  Set InFile = FSO.OpenTextFile(filepath, iomode:=ForReading, create:=False, Format:=TristateFalse)
   
   
   'print out print var values
   'print out print var values
   DM.intOrientation = InFile.readline
   DM.intOrientation = InFile.readline

+ 7 - 7
source/modules/VCS_String.bas

@@ -44,7 +44,7 @@ Public Function PadRight(ByVal value As String, ByVal count As Integer) As Strin
 End Function
 End Function
 
 
 ' returns substring between e.g. "(" and ")", internal brackets ar skippped
 ' returns substring between e.g. "(" and ")", internal brackets ar skippped
-Public Function SubString(ByVal p As Integer, ByVal s As String, ByVal startsWith As String, _
+Public Function SubString(ByVal p As Integer, ByVal S As String, ByVal startsWith As String, _
                           ByVal endsWith As String) As String
                           ByVal endsWith As String) As String
     Dim start As Integer
     Dim start As Integer
     Dim cursor As Integer
     Dim cursor As Integer
@@ -52,10 +52,10 @@ Public Function SubString(ByVal p As Integer, ByVal s As String, ByVal startsWit
     Dim p2 As Integer
     Dim p2 As Integer
     Dim level As Integer
     Dim level As Integer
     
     
-    start = InStr(p, s, startsWith)
+    start = InStr(p, S, startsWith)
     level = 1
     level = 1
-    p1 = InStr(start + 1, s, startsWith)
-    p2 = InStr(start + 1, s, endsWith)
+    p1 = InStr(start + 1, S, startsWith)
+    p2 = InStr(start + 1, S, endsWith)
     
     
     Do While level > 0
     Do While level > 0
         If p1 > p2 And p2 > 0 Then
         If p1 > p2 And p2 > 0 Then
@@ -74,9 +74,9 @@ Public Function SubString(ByVal p As Integer, ByVal s As String, ByVal startsWit
             SubString = vbNullString
             SubString = vbNullString
             Exit Function
             Exit Function
         End If
         End If
-        p1 = InStr(cursor + 1, s, startsWith)
-        p2 = InStr(cursor + 1, s, endsWith)
+        p1 = InStr(cursor + 1, S, startsWith)
+        p2 = InStr(cursor + 1, S, endsWith)
     Loop
     Loop
     
     
-    SubString = Mid$(s, start + 1, cursor - start - 1)
+    SubString = Mid$(S, start + 1, cursor - start - 1)
 End Function
 End Function

+ 53 - 53
source/modules/VCS_Table.bas

@@ -28,22 +28,22 @@ Public Sub ExportLinkedTable(ByVal tbl_name As String, ByVal obj_path As String)
 
 
     tempFilePath = VCS_File.TempFile()
     tempFilePath = VCS_File.TempFile()
     
     
-    Dim fso As Object
+    Dim FSO As Object
     Dim OutFile As Object
     Dim OutFile As Object
 
 
-    Set fso = CreateObject("Scripting.FileSystemObject")
+    Set FSO = CreateObject("Scripting.FileSystemObject")
     ' open file for writing with Create=True, Unicode=True (USC-2 Little Endian format)
     ' open file for writing with Create=True, Unicode=True (USC-2 Little Endian format)
     VCS_Dir.MkDirIfNotExist obj_path
     VCS_Dir.MkDirIfNotExist obj_path
     
     
-    Set OutFile = fso.CreateTextFile(tempFilePath, overwrite:=True, unicode:=True)
+    Set OutFile = FSO.CreateTextFile(tempFilePath, overwrite:=True, unicode:=True)
     
     
     OutFile.Write CurrentDb.TableDefs(tbl_name).name
     OutFile.Write CurrentDb.TableDefs(tbl_name).name
     OutFile.Write vbCrLf
     OutFile.Write vbCrLf
     
     
-    If InStr(1, CurrentDb.TableDefs(tbl_name).connect, "DATABASE=" & CurrentProject.path) Then
+    If InStr(1, CurrentDb.TableDefs(tbl_name).connect, "DATABASE=" & CurrentProject.Path) Then
         'change to relatave path
         'change to relatave path
         Dim connect() As String
         Dim connect() As String
-        connect = Split(CurrentDb.TableDefs(tbl_name).connect, CurrentProject.path)
+        connect = Split(CurrentDb.TableDefs(tbl_name).connect, CurrentProject.Path)
         OutFile.Write connect(0) & "." & connect(1)
         OutFile.Write connect(0) & "." & connect(1)
     Else
     Else
         OutFile.Write CurrentDb.TableDefs(tbl_name).connect
         OutFile.Write CurrentDb.TableDefs(tbl_name).connect
@@ -57,7 +57,7 @@ Public Sub ExportLinkedTable(ByVal tbl_name As String, ByVal obj_path As String)
     Set Db = CurrentDb
     Set Db = CurrentDb
     Dim td As DAO.TableDef
     Dim td As DAO.TableDef
     Set td = Db.TableDefs(tbl_name)
     Set td = Db.TableDefs(tbl_name)
-    Dim idx As DAO.Index
+    Dim idx As DAO.index
     
     
     For Each idx In td.Indexes
     For Each idx In td.Indexes
         If idx.Primary Then
         If idx.Primary Then
@@ -71,11 +71,11 @@ Err_LinkedTable_Fin:
     On Error Resume Next
     On Error Resume Next
     OutFile.Close
     OutFile.Close
     'save files as .odbc
     'save files as .odbc
-    Dim path As String
-    path = obj_path & VCS_IE_Functions.to_filename(tbl_name) & ".LNKD"
-    VCS_File.ConvertUcs2Utf8 tempFilePath, path
+    Dim Path As String
+    Path = obj_path & VCS_IE_Functions.to_filename(tbl_name) & ".LNKD"
+    VCS_File.ConvertUcs2Utf8 tempFilePath, Path
     
     
-    logger "ExportLinkedTable", "DEBUG", "LinkedTable " & tbl_name & " exported to " & path
+    logger "ExportLinkedTable", "DEBUG", "LinkedTable " & tbl_name & " exported to " & Path
     
     
     Exit Sub
     Exit Sub
     
     
@@ -118,15 +118,15 @@ Public Sub ExportTableDef(Db As DAO.Database, td As DAO.TableDef, ByVal tableNam
     filename = directory & tableName & ".sql"
     filename = directory & tableName & ".sql"
     Dim sql As String
     Dim sql As String
     Dim fieldAttributeSql As String
     Dim fieldAttributeSql As String
-    Dim idx As DAO.Index
+    Dim idx As DAO.index
     Dim fi As DAO.Field
     Dim fi As DAO.Field
-    Dim fso As Object
+    Dim FSO As Object
     Dim OutFile As Object
     Dim OutFile As Object
     Dim ff As Object
     Dim ff As Object
     
     
     'Debug.Print tableName
     'Debug.Print tableName
-    Set fso = CreateObject("Scripting.FileSystemObject")
-    Set OutFile = fso.CreateTextFile(filename, overwrite:=True, unicode:=False)
+    Set FSO = CreateObject("Scripting.FileSystemObject")
+    Set OutFile = FSO.CreateTextFile(filename, overwrite:=True, unicode:=False)
     
     
     sql = "CREATE TABLE " & strName(tableName) & " (" & vbCrLf
     sql = "CREATE TABLE " & strName(tableName) & " (" & vbCrLf
     
     
@@ -219,7 +219,7 @@ Private Function formatReferences(Db As DAO.Database, ff As Object, _
     formatReferences = sql
     formatReferences = sql
 End Function
 End Function
 
 
-Private Function formatConstraint(ByVal keyw As String, ByVal idx As DAO.Index) As String
+Private Function formatConstraint(ByVal keyw As String, ByVal idx As DAO.index) As String
     Dim sql As String
     Dim sql As String
     Dim fi As DAO.Field
     Dim fi As DAO.Field
     
     
@@ -233,8 +233,8 @@ Private Function formatConstraint(ByVal keyw As String, ByVal idx As DAO.Index)
     formatConstraint = sql
     formatConstraint = sql
 End Function
 End Function
 
 
-Private Function strName(ByVal s As String) As String
-    strName = "[" & s & "]"
+Private Function strName(ByVal S As String) As String
+    strName = "[" & S & "]"
 End Function
 End Function
 
 
 Private Function strType(ByVal i As Integer) As String
 Private Function strType(ByVal i As Integer) As String
@@ -367,7 +367,7 @@ End Function
 
 
 ' Export the lookup table `tblName` to `source\tables`.
 ' Export the lookup table `tblName` to `source\tables`.
 Public Sub ExportTableData(ByVal tbl_name As String, ByVal obj_path As String)
 Public Sub ExportTableData(ByVal tbl_name As String, ByVal obj_path As String)
-    Dim fso As Object
+    Dim FSO As Object
     Dim OutFile As Object
     Dim OutFile As Object
     Dim rs As DAO.Recordset ' DAO.Recordset
     Dim rs As DAO.Recordset ' DAO.Recordset
     Dim fieldObj As Object ' DAO.Field
     Dim fieldObj As Object ' DAO.Field
@@ -386,13 +386,13 @@ Public Sub ExportTableData(ByVal tbl_name As String, ByVal obj_path As String)
         Exit Sub
         Exit Sub
     End If
     End If
 
 
-    Set fso = CreateObject("Scripting.FileSystemObject")
+    Set FSO = CreateObject("Scripting.FileSystemObject")
     ' open file for writing with Create=True, Unicode=True (USC-2 Little Endian format)
     ' open file for writing with Create=True, Unicode=True (USC-2 Little Endian format)
     VCS_Dir.MkDirIfNotExist obj_path
     VCS_Dir.MkDirIfNotExist obj_path
     Dim tempFileName As String
     Dim tempFileName As String
     tempFileName = VCS_File.TempFile()
     tempFileName = VCS_File.TempFile()
 
 
-    Set OutFile = fso.CreateTextFile(tempFileName, overwrite:=True, unicode:=True)
+    Set OutFile = FSO.CreateTextFile(tempFileName, overwrite:=True, unicode:=True)
 
 
     c = 0
     c = 0
     For Each fieldObj In rs.Fields
     For Each fieldObj In rs.Fields
@@ -427,11 +427,11 @@ Public Sub ExportTableData(ByVal tbl_name As String, ByVal obj_path As String)
     rs.Close
     rs.Close
     OutFile.Close
     OutFile.Close
     
     
-    Dim path As String
-    path = obj_path & VCS_IE_Functions.to_filename(tbl_name) & ".txt"
-    VCS_File.ConvertUcs2Utf8 tempFileName, path
-    logger "ExportTableData", "DEBUG", "Data from '" & tbl_name & "' exported to " & path
-    fso.DeleteFile tempFileName
+    Dim Path As String
+    Path = obj_path & VCS_IE_Functions.to_filename(tbl_name) & ".txt"
+    VCS_File.ConvertUcs2Utf8 tempFileName, Path
+    logger "ExportTableData", "DEBUG", "Data from '" & tbl_name & "' exported to " & Path
+    FSO.DeleteFile tempFileName
 End Sub
 End Sub
 
 
 ' Kill Table if Exists
 ' Kill Table if Exists
@@ -443,11 +443,11 @@ End Sub
 
 
 Public Sub ImportLinkedTable(ByVal tblName As String, ByRef obj_path As String)
 Public Sub ImportLinkedTable(ByVal tblName As String, ByRef obj_path As String)
     Dim Db As DAO.Database
     Dim Db As DAO.Database
-    Dim fso As Object
+    Dim FSO As Object
     Dim InFile As Object
     Dim InFile As Object
     
     
     Set Db = CurrentDb
     Set Db = CurrentDb
-    Set fso = CreateObject("Scripting.FileSystemObject")
+    Set FSO = CreateObject("Scripting.FileSystemObject")
     
     
     Dim tempFilePath As String
     Dim tempFilePath As String
     tempFilePath = VCS_File.TempFile()
     tempFilePath = VCS_File.TempFile()
@@ -455,7 +455,7 @@ Public Sub ImportLinkedTable(ByVal tblName As String, ByRef obj_path As String)
     ConvertUtf8Ucs2 obj_path & tblName & ".LNKD", tempFilePath
     ConvertUtf8Ucs2 obj_path & tblName & ".LNKD", tempFilePath
     
     
     ' open file for reading with Create=False, Unicode=True (USC-2 Little Endian format)
     ' open file for reading with Create=False, Unicode=True (USC-2 Little Endian format)
-    Set InFile = fso.OpenTextFile(tempFilePath, iomode:=ForReading, create:=False, Format:=TristateTrue)
+    Set InFile = FSO.OpenTextFile(tempFilePath, iomode:=ForReading, create:=False, Format:=TristateTrue)
     
     
     On Error GoTo err_notable:
     On Error GoTo err_notable:
     DoCmd.DeleteObject acTable, tblName
     DoCmd.DeleteObject acTable, tblName
@@ -475,7 +475,7 @@ err_notable_fin:
     Dim connect As String
     Dim connect As String
     connect = InFile.readline()
     connect = InFile.readline()
     If InStr(1, connect, "DATABASE=.\") Then 'replace relative path with literal path
     If InStr(1, connect, "DATABASE=.\") Then 'replace relative path with literal path
-        connect = Replace(connect, "DATABASE=.\", "DATABASE=" & CurrentProject.path & "\")
+        connect = Replace(connect, "DATABASE=.\", "DATABASE=" & CurrentProject.Path & "\")
     End If
     End If
     td.connect = connect
     td.connect = connect
     
     
@@ -522,21 +522,21 @@ Public Sub ImportTableDef(ByVal tblName As String, ByVal directory As String)
     Dim filepath As String
     Dim filepath As String
     filepath = directory & tblName & ".sql"
     filepath = directory & tblName & ".sql"
     Dim Db As Object ' DAO.Database
     Dim Db As Object ' DAO.Database
-    Dim fso As Object
+    Dim FSO As Object
     Dim InFile As Object
     Dim InFile As Object
     Dim buf As String
     Dim buf As String
     Dim p As Integer
     Dim p As Integer
     Dim p1 As Integer
     Dim p1 As Integer
     Dim strMsg As String
     Dim strMsg As String
-    Dim s As Variant
-    Dim n As Integer
+    Dim S As Variant
+    Dim N As Integer
     Dim i As Integer
     Dim i As Integer
     Dim j As Integer
     Dim j As Integer
     Dim tempFileName As String
     Dim tempFileName As String
     tempFileName = VCS_File.TempFile()
     tempFileName = VCS_File.TempFile()
 
 
-    n = -1
-    Set fso = CreateObject("Scripting.FileSystemObject")
+    N = -1
+    Set FSO = CreateObject("Scripting.FileSystemObject")
 
 
     VCS_File.ConvertUtf8Ucs2 filepath, tempFileName
     VCS_File.ConvertUtf8Ucs2 filepath, tempFileName
     
     
@@ -549,35 +549,35 @@ Public Sub ImportTableDef(ByVal tblName As String, ByVal directory As String)
     buf = ReadFile(filepath, "x-ansi")
     buf = ReadFile(filepath, "x-ansi")
     
     
     ' The following block is needed because "on update" actions may cause problems
     ' The following block is needed because "on update" actions may cause problems
-    For Each s In Split("UPDATE|DELETE", "|")
+    For Each S In Split("UPDATE|DELETE", "|")
     
     
-      p = InStr(buf, "ON " & s & " CASCADE")
+      p = InStr(buf, "ON " & S & " CASCADE")
       Do While p > 0
       Do While p > 0
-          n = n + 1
-          ReDim Preserve k(n)
-          k(n).table = tblName
-          k(n).isUpdate = (s = "UPDATE")
+          N = N + 1
+          ReDim Preserve k(N)
+          k(N).table = tblName
+          k(N).isUpdate = (S = "UPDATE")
           
           
           buf = Left$(buf, p - 1) & Mid$(buf, p + 18)
           buf = Left$(buf, p - 1) & Mid$(buf, p + 18)
           p = InStrRev(buf, "REFERENCES", p)
           p = InStrRev(buf, "REFERENCES", p)
           p1 = InStr(p, buf, "(")
           p1 = InStr(p, buf, "(")
-          k(n).foreignFields = Split(VCS_String.SubString(p1, buf, "(", ")"), ",")
-          k(n).foreignTable = Trim$(Mid$(buf, p + 10, p1 - p - 10))
+          k(N).foreignFields = Split(VCS_String.SubString(p1, buf, "(", ")"), ",")
+          k(N).foreignTable = Trim$(Mid$(buf, p + 10, p1 - p - 10))
           p = InStrRev(buf, "CONSTRAINT", p1)
           p = InStrRev(buf, "CONSTRAINT", p1)
           p1 = InStrRev(buf, "FOREIGN KEY", p1)
           p1 = InStrRev(buf, "FOREIGN KEY", p1)
           If (p1 > 0) And (p > 0) And (p1 > p) Then
           If (p1 > 0) And (p > 0) And (p1 > p) Then
           ' multifield index
           ' multifield index
-              k(n).refFields = Split(VCS_String.SubString(p1, buf, "(", ")"), ",")
+              k(N).refFields = Split(VCS_String.SubString(p1, buf, "(", ")"), ",")
           ElseIf p1 = 0 Then
           ElseIf p1 = 0 Then
           ' single field
           ' single field
           End If
           End If
-          p = InStr(p, "ON " & s & " CASCADE", buf)
+          p = InStr(p, "ON " & S & " CASCADE", buf)
       Loop
       Loop
     Next
     Next
     
     
     On Error Resume Next
     On Error Resume Next
     
     
-    For i = 0 To n
+    For i = 0 To N
         strMsg = k(i).table & " to " & k(i).foreignTable
         strMsg = k(i).table & " to " & k(i).foreignTable
         strMsg = strMsg & "(  "
         strMsg = strMsg & "(  "
         For j = 0 To UBound(k(i).refFields)
         For j = 0 To UBound(k(i).refFields)
@@ -613,21 +613,21 @@ Public Sub ImportTableData(ByVal tblName As String, ByVal obj_path As String)
     Dim Db As Object ' DAO.Database
     Dim Db As Object ' DAO.Database
     Dim rs As Object ' DAO.Recordset
     Dim rs As Object ' DAO.Recordset
     Dim fieldObj As Object ' DAO.Field
     Dim fieldObj As Object ' DAO.Field
-    Dim fso As Object
+    Dim FSO As Object
     Dim InFile As Object
     Dim InFile As Object
     Dim c As Long, buf As String, Values() As String, value As Variant
     Dim c As Long, buf As String, Values() As String, value As Variant
-    Dim path As String
+    Dim Path As String
     
     
-    Set fso = CreateObject("Scripting.FileSystemObject")
+    Set FSO = CreateObject("Scripting.FileSystemObject")
     
     
     Dim tempFileName As String
     Dim tempFileName As String
     tempFileName = VCS_File.TempFile()
     tempFileName = VCS_File.TempFile()
     
     
-    path = obj_path & tblName & ".txt"
-    VCS_File.ConvertUtf8Ucs2 path, tempFileName
+    Path = obj_path & tblName & ".txt"
+    VCS_File.ConvertUtf8Ucs2 Path, tempFileName
     
     
     ' open file for reading with Create=False, Unicode=True (USC-2 Little Endian format)
     ' open file for reading with Create=False, Unicode=True (USC-2 Little Endian format)
-    Set InFile = fso.OpenTextFile(tempFileName, iomode:=ForReading, create:=False, Format:=TristateTrue)
+    Set InFile = FSO.OpenTextFile(tempFileName, iomode:=ForReading, create:=False, Format:=TristateTrue)
     Set Db = CurrentDb
     Set Db = CurrentDb
 
 
     Db.execute "DELETE FROM [" & tblName & "]"
     Db.execute "DELETE FROM [" & tblName & "]"
@@ -662,7 +662,7 @@ Public Sub ImportTableData(ByVal tblName As String, ByVal obj_path As String)
     rs.Close
     rs.Close
     InFile.Close
     InFile.Close
     
     
-    logger "ImportTableData", "DEBUG", "Table data '" & tblName & "' imported from " & path
+    logger "ImportTableData", "DEBUG", "Table data '" & tblName & "' imported from " & Path
 
 
-    fso.DeleteFile tempFileName
+    FSO.DeleteFile tempFileName
 End Sub
 End Sub

+ 1 - 0
source/references.csv

@@ -3,3 +3,4 @@
 {2A75196C-D9EB-4129-B803-931327F72D5C},2,8
 {2A75196C-D9EB-4129-B803-931327F72D5C},2,8
 {00000600-0000-0010-8000-00AA006D2EA4},2,8
 {00000600-0000-0010-8000-00AA006D2EA4},2,8
 {420B2830-E718-11CF-893D-00A0C9054228},1,0
 {420B2830-E718-11CF-893D-00A0C9054228},1,0
+{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1},2,0

+ 1 - 1
source/tables/ztbl_openaccess.txt

@@ -1,3 +1,3 @@
 key	val
 key	val
 include_tables	ztbl_openaccess,tbl_commands,USysRegInfo
 include_tables	ztbl_openaccess,tbl_commands,USysRegInfo
-sources_date	07/11/2016 17:35:57
+sources_date	09/11/2016 16:50:18