Skip to content

Commit 9228365

Browse files
authored
Merge pull request #1 from AccessCodeLib/dev
v1.8.0
2 parents e0b35bb + b61d279 commit 9228365

21 files changed

+522
-458
lines changed

.Copy2AddInFolder.cmd

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
copy ACLibFilterFormWizard.accdb .\access-add-in\ACLibFilterFormWizard.accda

.CreateWorkingFileFormAddInFolder.cmd

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
@echo off
2+
3+
if exist .\ACLibFilterFormWizard.accdb (
4+
set /p CopyFile=ACLibFilterFormWizard.accdb exists .. overwrite with access-add-in\ACLibFilterFormWizard.accda? [Y/N]:
5+
) else (
6+
set CopyFile=Y
7+
)
8+
9+
if /I %CopyFile% == Y (
10+
echo File is copied ...
11+
) else (
12+
echo Batch is cancelled
13+
pause
14+
exit
15+
)
16+
17+
copy .\access-add-in\ACLibFilterFormWizard.accda ACLibFilterFormWizard.accdb
18+
19+
timeout 2
52 KB
Binary file not shown.

access-add-in/Install.vbs

+7-20
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,24 @@ const AddInName = "ACLib-FilterForm-Wizard"
22
const AddInFileName = "ACLibFilterFormWizard.accda"
33
const MsgBoxTitle = "Install ACLib-FilterForm-Wizard"
44

5-
MsgBox "Vor dem Aktualisieren der Add-In-Datei darf das Add-In nicht geladen sein!" & chr(13) & _
6-
"Zur Sicherheit alle Access-Instanzen schließen.", , MsgBoxTitle & ": Hinweis"
5+
MsgBox "Before updating the add-in file, the add-in must not be loaded!" & chr(13) & _
6+
"Close all access instances for safety.", , MsgBoxTitle & ": Hinweis"
77

8-
Select Case MsgBox("Soll das Add-In als MDE verwendet werden?" + chr(13) & _
9-
"(Add-In wird kompiliert ins Add-In-Verzeichnis kopiert.)", 3, MsgBoxTitle)
8+
Select Case MsgBox("Should the add-in be used as a compiled file (accde)?" + chr(13) & _
9+
"(Add-In is compiled and copied to the Add-In directory.)", 3, MsgBoxTitle)
1010
case 6 ' vbYes
1111
CreateMde GetSourceFileFullName, GetDestFileFullName
12-
MsgBox "Add-In wurde kompilliert und in '" + GetAddInLocation + "' abgespeichert", , MsgBoxTitle
12+
MsgBox "Add-In was compiled and saved in '" + GetAddInLocation + "'.", , MsgBoxTitle
1313
case 7 ' vbNo
1414
FileCopy GetSourceFileFullName, GetDestFileFullName
15-
MsgBox "Add-In wurde in '" + GetAddInLocation + "' abgespeichert", , MsgBoxTitle
15+
MsgBox "Add-In was saved in '" + GetAddInLocation + "'.", , MsgBoxTitle
1616
case else
1717

1818
End Select
1919

2020

21-
22-
23-
2421
'##################################################
25-
' Hilfsfunktionen:
22+
' Utility functions:
2623

2724
Function GetSourceFileFullName()
2825
GetSourceFileFullName = GetScriptLocation & AddInFileName
@@ -33,36 +30,26 @@ Function GetDestFileFullName()
3330
End Function
3431

3532
Function GetScriptLocation()
36-
3733
With WScript
3834
GetScriptLocation = Replace(.ScriptFullName & ":", .ScriptName & ":", "")
3935
End With
40-
4136
End Function
4237

4338
Function GetAddInLocation()
44-
4539
GetAddInLocation = GetAppDataLocation & "Microsoft\AddIns\"
46-
4740
End Function
4841

4942
Function GetAppDataLocation()
50-
5143
Set wsShell = CreateObject("WScript.Shell")
5244
GetAppDataLocation = wsShell.ExpandEnvironmentStrings("%APPDATA%") & "\"
53-
5445
End Function
5546

5647
Function FileCopy(SourceFilePath, DestFilePath)
57-
5848
set fso = CreateObject("Scripting.FileSystemObject")
5949
fso.CopyFile SourceFilePath, DestFilePath
60-
6150
End Function
6251

6352
Function CreateMde(SourceFilePath, DestFilePath)
64-
6553
Set AccessApp = CreateObject("Access.Application")
6654
AccessApp.SysCmd 603, (SourceFilePath), (DestFilePath)
67-
6855
End Function

source/_config_Application.bas

+28-33
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,18 @@
11
Attribute VB_Name = "_config_Application"
22
'---------------------------------------------------------------------------------------
3+
' Modul: _initApplication
4+
'---------------------------------------------------------------------------------------
5+
'/**
6+
' <summary>
7+
' Application configuration
8+
' </summary>
9+
' <remarks>
10+
' </remarks>
11+
'**/
12+
'---------------------------------------------------------------------------------------
313
'<codelib>
414
' <file>%AppFolder%/source/_config_Application.bas</file>
5-
' <replace>base/_config_Application.bas</replace> 'dieses Modul ersetzt base/_config_Application.bas
15+
' <replace>base/_config_Application.bas</replace>
616
' <license>_codelib/license.bas</license>
717
' <use>%AppFolder%/source/defGlobal_ACLibFilterFormWizard.bas</use>
818
' <use>base/_initApplication.bas</use>
@@ -15,20 +25,20 @@ Attribute VB_Name = "_config_Application"
1525
'</codelib>
1626
'---------------------------------------------------------------------------------------
1727
'
18-
' Nicht vergessen: USELOCALIZATION = 1 als Compiler-Arg. in Projekteigenschaft einstellen
28+
' Don't forget: set USELOCALIZATION = 1 as Compiler argument in Project properties
1929
'
2030
'
2131
Option Compare Database
2232
Option Explicit
2333
Option Private Module
2434

25-
'Versionsnummer
26-
Private Const APPLICATION_VERSION As String = "1.7.1" '2023-03-01
35+
'Version
36+
Private Const APPLICATION_VERSION As String = "1.8.0" '2023-05
2737

2838
#Const USE_CLASS_APPLICATIONHANDLER_APPFILE = 1
2939
#Const USE_CLASS_APPLICATIONHANDLER_VERSION = 1
3040

31-
Private Const APPLICATION_NAME As String = "ACLib FilterForm Wizard"
41+
Public Const APPLICATION_NAME As String = "ACLib FilterForm Wizard"
3242
Private Const APPLICATION_FULLNAME As String = "Access Code Library - FilterForm Wizard"
3343
Private Const APPLICATION_TITLE As String = APPLICATION_FULLNAME
3444
Private Const APPLICATION_ICONFILE As String = "ACLib.ico"
@@ -49,9 +59,9 @@ Private m_Extensions As ApplicationHandler_ExtensionCollection
4959
'---------------------------------------------------------------------------------------
5060
'/**
5161
' <summary>
52-
' Konfigurationseinstellungen initialisieren
62+
' Init application configuration
5363
' </summary>
54-
' <param name="oCurrentAppHandler">Möglichkeit einer Referenzübergabe, damit nicht CurrentApplication genutzt werden muss</param>
64+
' <param name="CurrentAppHandlerRef">Possibility of a reference transfer so that CurrentApplication does not have to be used</param>
5565
' <returns></returns>
5666
' <remarks>
5767
' </remarks>
@@ -62,47 +72,39 @@ Public Sub InitConfig(Optional ByRef CurrentAppHandlerRef As ApplicationHandler
6272
On Error GoTo HandleErr
6373

6474
'----------------------------------------------------------------------------
65-
' Fehlerbehandlung
75+
' Error handler
6676
'
6777

6878
modErrorHandler.DefaultErrorHandlerMode = DefaultErrorHandlerMode
6979

70-
71-
'----------------------------------------------------------------------------
72-
' Globale Variablen einstellen
73-
'
74-
'defGlobal_FilterFormWizard.ACLibIconFileName = m_ApplicationIconFile
75-
76-
7780
'----------------------------------------------------------------------------
78-
' Anwendungsinstanz einstellen
81+
' Application instance
7982
'
8083
If CurrentAppHandlerRef Is Nothing Then
8184
Set CurrentAppHandlerRef = CurrentApplication
8285
End If
8386

8487
With CurrentAppHandlerRef
8588

86-
'Zur Sicherheit AccDb einstellen
87-
Set .AppDb = CodeDb 'muss auf CodeDb zeigen,
88-
'da diese Anwendung als Add-In verwendet wird
89+
'To be on the safe side, set AccDb
90+
Set .AppDb = CodeDb 'must point to CodeDb,
91+
'as this application is used as an add-in
8992

90-
'Anwendungsname
93+
'Application name
9194
.ApplicationName = APPLICATION_NAME
9295
.ApplicationFullName = APPLICATION_FULLNAME
9396
.ApplicationTitle = APPLICATION_TITLE
9497

9598
'Version
9699
.Version = APPLICATION_VERSION
97100

98-
' Formular, das am Ende von CurrentApplication.Start aufgerufen wird
101+
'Form called at the end of CurrentApplication.Start
99102
.ApplicationStartFormName = ApplicationStartFormName
100-
101103

102104
End With
103105

104106
'----------------------------------------------------------------------------
105-
' Erweiterungen:
107+
' Extensions:
106108
'
107109
Set m_Extensions = New ApplicationHandler_ExtensionCollection
108110
With m_Extensions
@@ -118,13 +120,6 @@ On Error GoTo HandleErr
118120

119121
End With
120122

121-
'----------------------------------------------------------------------------
122-
' Konfiguration nach Erweiterungen
123-
'
124-
125-
'AppIcon
126-
'oCurrentAppHandler.SetAppIcon CodeProject.Path & "\" & m_ApplicationIconFile, True
127-
128123
ExitHere:
129124
Exit Sub
130125

@@ -143,11 +138,11 @@ End Sub
143138

144139
'############################################################################
145140
'
146-
' Funktionen für die Anwendungswartung
147-
' (werden nur im Anwendungsentwurf benötigt)
141+
' Functions for application maintenance
142+
' (only needed in the application design)
148143
'
149144
'----------------------------------------------------------------------------
150-
' Hilfsfunktion zum Speichern von Dateien in die lokale AppFile-Tabelle
145+
' Auxiliary function for saving files to the local AppFile table
151146
'----------------------------------------------------------------------------
152147
Private Sub SetAppFiles()
153148
Call CurrentApplication.Extensions("AppFile").SaveAppFile("AppIcon", CodeProject.Path & "\" & APPLICATION_ICONFILE)

source/_initApplication.bas

-67
This file was deleted.

0 commit comments

Comments
 (0)