Color scheme: Dark
You are here: start » en » Documentation » Microsoft Access development tools » WKL Forms Object Library » WKL Forms Object Library how-to guides » How to: Install the released package

How to: Install the released package

Install a release of the WKL Forms Object Library on a development PC so that the controls appear in Access's ActiveX Controls dialog and VBA knows them - without the source code and without building anything.

Requires Windows 10 or 11 and Microsoft 365 Access or the Access Runtime.

Solution overview

  • Runtime: install the .NET 10 Desktop Runtime in the bitness of Office.
  • Files: copy the folder of the Office bitness (x86 for 32-bit Office, x64 for 64-bit Office) of the release to a local folder that stays where it is.
  • Registration: register Wkl.Forms.ObjectLibrary.dll from that folder with the regsvr32 of the same bitness, for the current Windows user (/n /i:user, no administrator rights).
  • Check: the reference WKL Forms x.y Object Library of the release appears in the VBA editor.

Supported configuration: 32-bit and 64-bit Access (Microsoft 365 Access and the Access Runtime); the package contains the files for both.

Implementation

  1. Find the bitness of Office. WKL follows Microsoft Access, not Windows: use the x64 files with 64-bit Access and the x86 files with 32-bit Access. In Access: File › Account › About Access shows “32-bit” or “64-bit”. The bitness of Windows does not matter: 32-bit Office on 64-bit Windows needs the 32-bit (x86) files. Microsoft installs Office as 64-bit by default; 32-bit Office remains common where older VBA solutions, ActiveX controls or add-ins are in use, which is why both bitnesses are built. A mismatch shows as missing controls or a MISSING reference (troubleshooting).
  2. Install the .NET 10 Desktop Runtime of that bitness from https://dotnet.microsoft.com/download/dotnet/10.0 (column “Desktop Runtime”, x86 for 32-bit Office, x64 for 64-bit Office). A runtime of the other bitness does not help.
  3. Copy the files. A release contains the folders x86 and x64 with the controls, tools\build (the build tool, see How to: Build an Access application from its text sources), control-blocks (the control blocks of every WKL control, see How to: Put WKL controls into forms by code), CHANGELOG.md, and addin with tools\install-addin.ps1, the add-in WKL Extensions with the designers under Database Tools › Add-Ins (run tools\install-addin.ps1 once per Windows user, with Access closed). Copy the whole release package to a local folder that stays where it is, for example %LOCALAPPDATA%\WKL\Access Components\<version>, so that tools, control-blocks and themes stay together with the controls and project files can name them from one place. The files of the bitness folder belong together; the registration points to %LOCALAPPDATA%\WKL\Access Components\<version>\x86:

    FilePurpose
    Wkl.Forms.ObjectLibrary.dllThe file you register: the native start module with the type library
    Wkl.Forms.ObjectLibrary.Managed.dll, .deps.json, .runtimeconfig.jsonThe controls on .NET 10, loaded by the start module from the same folder
    Wkl.Forms.ObjectLibrary.Core.dllLogic of the controls without COM
    Wkl.Office.Json.Core.dllThe JSON engine behind JPath and AsJSON
    *.pdb, *.xmlDebug symbols and documentation files; not needed to run, may be left out
  4. Close every Access instance (Access keeps a loaded DLL until it exits), then register for the current Windows user. For 32-bit Office:

    %windir%\SysWOW64\regsvr32.exe /n /i:user "%LOCALAPPDATA%\WKL\Access Components\<version>\x86\Wkl.Forms.ObjectLibrary.dll"

    For 64-bit Office:

    %windir%\System32\regsvr32.exe /n /i:user "%LOCALAPPDATA%\WKL\Access Components\<version>\x64\Wkl.Forms.ObjectLibrary.dll"

    regsvr32 reports success in a message box; add /s to suppress it in scripts (the exit code is then 0 on success). Registering a release removes the registration of every other version of the library for this user, so a database never picks an older copy.

  5. Check. Open a database, open the VBA editor (Alt+F11), choose Tools › References and find WKL Forms <version> Object Library (the version of the release). A form in design view now offers the controls under Form Design › Controls › ActiveX Controls (“WKL Grid”, “WKL TreeView” …). Access sets the reference WKL Forms x.y Object Library itself when a control is inserted; it provides IntelliSense and the constants (wke…, wso…, wdz… and so on). WklToast and WklLinkManager are objects, not controls: set the reference in the VBA editor (Tools › References › WKL Forms x.y Object Library) and create them with New.

To remove the registration, close Access and run the same command with /u:

%windir%\SysWOW64\regsvr32.exe /u /n /i:user "%LOCALAPPDATA%\WKL\Access Components\<version>\x86\Wkl.Forms.ObjectLibrary.dll"

To install a newer release, close Access, copy it into a folder of its own and register it as in step 4; then delete the old folder.

Remarks

  • Per Windows user. /n /i:user writes only to HKEY_CURRENT_USER. Every Windows user of the PC who opens the database registers once for themselves. A registration for all users of a PC (regsvr32 without /n /i:user, as administrator) is not supported in this release.
  • The folder must stay. Moving or deleting the folder breaks the registration: the controls are missing from the dialog and the reference is marked MISSING. Register again from the new place.
  • What the registration looks like. The class (WklForms.* ProgIDs and their class ids) is the same in every release, so a database built with an older release finds the newer one. The type library has the version of the release, x.y; Windows writes it in hexadecimal as the key name below HKEY_CURRENT_USER\Software\Classes\TypeLib\{A37D549E-FCD0-48EC-8B14-C7323B747E4F}, so release 1.56 is the key 1.38 (0x38 = 56), with the name “WKL Access Components 1.56” as its value and 0\win32 and 0\win64 naming the DLL of each bitness. The VBA editor shows the decimal name. A database binds to the type library by its id and resolves the version that is registered when it opens (see Versions).
  • No setup program of its own. Install with the steps above or a script with them (How to: Deploy an application with WKL controls to user PCs), or deliver the components together with the application through WKL Bootstrapper, which registers them for each user.
  • Another .NET version in Access. A native start module loads the .NET 10 runtime into MSACCESS.EXE. A process can run only one .NET (CoreCLR) version: when another add-in loaded a different one into Access first, the controls cannot start, and the start module reports this in a message instead of disturbing Access; see Access reports that another .NET version is loaded.
en/wiki/msaccess/comctl/how-to/install-the-released-package.txt · Last modified: by Wolfgang van der Stille