WKL Forms Object Library: controls for Access forms
ActiveX controls for Microsoft Access forms, built on .NET 10: trees, datasheets, a Gantt chart,
layout, navigation, buttons, status displays, validation, and notifications. They work as if they
were part of Access: early binding with IntelliSense, settings in the property sheet and in a
designer window, events in the form module, fixed error numbers, and full support for ACCDB, ACCDE,
and the Access Runtime. This documentation is for Access and VBA developers who put the controls on
forms, and for administrators who install them on users' PCs. Current release: 2.0.1. For the
changes in each release, see CHANGELOG.md in the release package. Up to release 1.68.2, the library was called WKL Access Components.
The problem it solves
The controls Access offers in design view (text box, combo box, list box, subform, tab control, button, and so on) handle classic data entry well. What they lack is what users expect from business software today: a tree bound to a table, a datasheet that groups, filters, and totals like a modern grid, a Gantt chart, a navigation bar, docked areas that follow the window size, status chips, and toast notifications. Access developers fill that gap with workarounds such as nested subforms, continuous forms with conditional formatting, or the unbound Microsoft TreeView from the Common Controls, filled by VBA. Every application pays for these workarounds in code, and they still look and behave differently from the rest of Office.
Component suites such as DevExpress WinForms or Telerik UI for WinForms solve this problem for .NET
applications with Windows Forms controls. An Access form, however, hosts only ActiveX controls, so
those suites can't be used there. The WKL Forms Object Library brings comparable capabilities to Access as
ActiveX controls that follow Access conventions: RecordSource, LinkMasterFields, Requery, the
property sheet, events in the form module, ACCDE, and the runtime.
Use cases
| Scenario | Control |
|---|---|
| Show a hierarchy from a table (organization chart, bill of materials, folders) and edit it with drag and drop | WklTreeView, WklTreeList |
| A list of records with grouping, a filter row, totals, master-detail, and a million rows from a server | WklGrid |
| Edit a single record as a property list next to a list | WklPropertyGrid |
| Plan tasks with dependencies and a work calendar, and exchange plans with Microsoft Project | WklGantt |
| An application shell with navigation on the left, a header with commands, and pages that fill the window | WklNavBar, WklActionBar, WklDockLayout |
| Check input against rules before the record is saved, with the message next to the field | WklValidator |
| Link tables to development, test, and production servers and switch between them | WklLinkManager |
| Show a series of measurements with its limits and trend, or counts per month | WklChart |
| Show where things happen: sign-ins per city, sites, or customers on a world map | WklMap |
| Search as the user types, refresh a counter every 30 seconds, send many web requests at the rate a service allows | WklTimerList |
| Measure and display a key metric, a status, or a count | WklGauge, WklStatusLabel, WklBadge |
What the components don't do: they don't replace the Access controls for simple input fields, they don't work as lists in Access reports (a list shows a notice there instead), and they aren't Windows Forms controls for .NET applications.
Get started
- How to: Install the released package: prerequisites, bitness, and registration
- How to: Move an application to release 2.0: for applications built against release 1.x
- Build an administration application: several controls working together in one application, with a shell for navigation and pages and a list with a docked edit form that validates input (tutorial of the WKL Administration Shell Template)
- Bind a tree to a table and Create a customer grid with orders: one control at a time
Common tasks
Tasks for an individual control are listed in its overview (see Key features).
Visual aid
graph TD
P["1 – Release package: x86 or x64, tools, addin, control-blocks"]
F["2 – PC, per Windows user: local folder (no administrator rights)"]
A["3 – Access: the ActiveX Controls dialog lists WKL Grid, WKL TreeView ...; reference WKL Forms x.y Object Library"]
R["4 – Form with WKL controls: property sheet, designer, events in the form module"]
P -- "copy" --> F
F -- "register: regsvr32 /n /i:user" --> A
A -- "insert a control" --> R| Region | Meaning |
|---|---|
| 1 | The release: the controls for the bitness of Office, the build tool, the WKL Extensions add-in, and the control blocks |
| 2 | The files, copied to a permanent folder and registered for the current Windows user |
| 3 | Access offers the controls and the type library; inserting a control sets the reference automatically |
| 4 | You configure each control on the form in the property sheet, in its designer, or with VBA |
Key features
You place the controls on Access forms (or UserForms). Components marked (object) are created in VBA and have no window of their own.
Data views
Show and edit records from tables and queries.
| Component | Purpose | Documentation |
|---|---|---|
WklGrid | A flat datasheet with grouping, column filters, master-detail, detail views, a server mode for large tables, and a list view. | overview · reference |
WklTreeView | A tree bound to a table, query, or SQL statement, with editing, drag and drop, search, and filtering. | overview · reference |
WklTreeList | A hierarchical datasheet: the tree with columns, cell editors, formatting, totals, and export to Excel. | overview · reference |
WklGantt | A Gantt chart next to the datasheet, with dependencies, a work calendar, scheduling, and exchange with Microsoft Project. | overview · reference |
WklPropertyGrid | A single record as “caption · value” rows grouped in categories, on a form of its own or as a detail view. | overview · reference |
WklChart | A line, scatter, column, or bar chart of a table or query that follows the current record, with limits, bands, and a trend. | overview · reference |
WklMap | Points on a world map from a table or query, sized and colored by a value; follows the current record and works without a map service. | overview · reference |
Data editors
Single values on a form, bound the same way as Access controls.
| Component | Purpose | Documentation |
|---|---|---|
WklToggleSwitch | A Yes/No switch that takes effect immediately, bound like a check box. | overview · reference |
WklTokenBox | Several values of a record shown as tokens with suggestions and stored in a child table. | overview · reference |
WklButtonEdit | A text box with a button on its right edge, bound like a text box, for values from a dialog box or a lookup. | overview · reference |
WklSpinEdit | A number with up and down arrows, limits, a step, and a unit, bound like a text box; also available as a list column (wedSpin). | overview · reference |
WklValidator | Checks the text boxes of an Access form against rules and prevents an invalid record from being saved. | overview · reference |
Layout
Arrange, split, and collapse the areas of a form.
| Component | Purpose | Documentation |
|---|---|---|
WklDockLayout | Arranges the areas of a form in zones every time the form is resized, with splitters and tab groups. | overview · reference |
WklSplitter | A splitter between two areas of a form that the user can drag or use to collapse one side. | overview · reference |
WklDrawer | A panel on the right edge of a form that opens next to a list, with a width for each content and anchors for the controls inside it. | overview · reference |
Navigation and commands
Move around an application and run its commands.
| Component | Purpose | Documentation |
|---|---|---|
WklNavBar | The navigation bar of an application shell, filled by code or from a navigation table. | overview · reference |
WklActionBar | The header of a page or application shell: title, subtitle, status, and a command bar with split buttons and shortcuts; commands that don't fit move into an overflow menu. | overview · reference |
WklButton | A command, menu, split, or segmented button with the look of current Office. | overview · reference |
WklRibbon (object) | Ribbons, the File tab (Backstage view), and shortcut menus of a database, built from a single list of commands, with a designer and conditions. | overview · reference |
WklNavPane (object) | The built-in Access Navigation Pane organized as one custom category with groups, display names, a start group, and conditions, with a designer. | overview · reference |
Status and feedback
Show states, counts, and results to the user.
| Component | Purpose | Documentation |
|---|---|---|
WklStatusLabel | A one-line status: text with a kind that sets its colors, bound like a text box. | overview · reference |
WklBadge | A count or a dot on the corner of an Access button, label, or text box. | overview · reference |
WklToast (object) | Short notifications after an action, with an optional action such as Undo. | overview · reference |
WklGauge | A value on a scale with colored ranges: half or three-quarter circle, horizontal or vertical bar, or several bars with a legend. | overview · reference |
WklKpiCard | A key metric for a start page: value, variance from a comparison value, status, sparkline, and badge; clickable like a tile. | overview · reference |
Media
Barcodes, QR codes, and images on forms and in reports.
| Component | Purpose | Documentation |
|---|---|---|
WklBarcode | A QR code, Code 128, or Data Matrix symbol for a text, bound like a text box; in reports, one code per record. | overview · reference |
WklImage | An image from a file, the database's image gallery, SVG text, or a field; SVG stays sharp at any size, and single-color icons take on the color of the form. | overview · reference |
Application and connections
The application as a whole and its data sources.
| Component | Purpose | Documentation |
|---|---|---|
WklApplication (object) | Title, icon, start form, ribbon, and the user interface of each mode (development, administration, production) as startup properties, plus settings an operator may adjust. | overview · reference |
WklLinkManager (object) | Keeps the linked ODBC tables of a front end in sync with a configuration for each profile (DEV, TEST, PROD). | overview · reference |
WklTimerList | Scheduled tasks for a form: delayed searches, periodic checks, and a rate-limited queue of web requests, without a DoEvents loop. | overview · reference |
WklTexts (object) | The application's own texts by key in the language of the components, from the table USysWklTexts; standard texts such as OK, Cancel, and Save in all five languages. | how-to · reference |
FindNodes, JPath filters, and AsJSON use the JSON engine of WKL Office JSON, which is included in
the release package. For a quick start, the package also contains an application shell template
with a navigation bar, a page in a subform, and a command bar (under templates\app-shell).
Core concepts
Three ways to configure a control. The property sheet (Other tab), the control's designer
window (How to: Open the designer of a control), and
VBA through the control's Object property (Me!Tree1.Object.RecordSource = …). All three set the
same properties, which Access saves with the form.
Events in the form module. A control raises its events in the module of the form it sits on. Access doesn't list them on the Event tab of the property sheet; you create the procedures from the designer's Events page or from the lists in the code window (How to: Create event procedures for a control).
Bound to data like an Access control. The lists read a RecordSource (table, query, or SQL
statement) and write the user's changes back immediately (AutoSave). A tree needs only
RecordSource, KeyField, ParentField, and TextField. What the record source must allow is
described in Editing and saving: prerequisites. In design view,
a control doesn't query its data source unless LivePreview is True
(How to: Show real data in Design view).
Fixed error numbers. The controls raise errors with fixed numbers (the WklErrorCode
constants) and Err.Source = "WklForms"; texts that users see are in the language of the
components (How to: Handle errors of WKL controls in VBA).
Language. Designers, messages, Err.Description, shortcut menus, and the names read by screen
readers are available in English, German, Slovenian, Croatian, and Italian. The components use the
language of the application model, otherwise that of Office, then that of Windows, and finally
English. Error numbers, property names, stored values, and IntelliSense are the same in every
language; dates and numbers follow the Windows regional settings
(How to: Choose the language of the components).
Colors. Every control has a color scheme (ColorScheme). The default, Automatic, first follows
Windows high contrast, then the theme colors of the Access database (for example, “Riviera”), and
otherwise uses a light palette; you can also select light, dark, or high contrast explicitly. The
controls don't follow the Office theme (Colorful, Dark Gray, Black), which Office stores for each
user account (How to: Match the colors of the database design).
One type library, versioned with its interface. A database references the WKL Forms Object Library type library and uses the version registered on the PC when it opens; see Versions.
Administration
Troubleshooting
Each page describes the symptom, the versions it applies to, the cause, and the solution.
For developers
- API reference for every class and for the enumerations: see the Documentation column under Key features. Collections and their items: WklColumns · WklColumn · WklBands · WklBand · WklFormatRules · WklFormatRule · WklLinkDifferences · WklLinkDifference
Related topics
CHANGELOG.mdin the release package: the changes in each release- Application shell template (in the package under
templates\app-shell, described in its own README): the frame of an application, built by the build tool
Reference
Versions
All controls share one type library, WKL Forms Object Library, whose version goes up with every
change to its interface. Each release has a version number x.y.z: x.y is the type library
version, and z counts fixes that don't change the interface. The changes in each release are
listed in CHANGELOG.md in the release package; the current release is 2.0.1.
| Control or object | Since release |
|---|---|
WklTreeView, WklTreeList, WklGantt, WklGrid, WklSplitter, WklDockLayout, WklStatusLabel, WklLinkManager | 1.23.0 |
WklNavBar | 1.24.0 (navigation table: 1.26.0) |
WklButton | 1.26.0 (split and segmented buttons, badge: 1.27.0) |
WklValidator | 1.31.0 |
WklToggleSwitch | 1.32.0 |
WklTokenBox | 1.33.0 |
WklToast | 1.34.0 |
WklBadge | 1.35.0 |
WklGrid list view | 1.36.0 |
WklDockLayout tab groups | 1.37.0 |
WklPropertyGrid | 1.38.0 |
WklButtonEdit, WklSpinEdit | 1.43.0 |
WklGauge, WklKpiCard | 1.44.0 |
WklActionBar | 1.46.0 |
ColorScheme for every control and for WklToast; EditOnClick for the grids | 1.47.0 |
WklDrawer | 1.48.0 |
WklRibbon and the ribbon designer | 1.49.0 |
WklNavPane, the navigation pane designer, and the application shell template | 1.50.0 |
WklApplication, the application designer, and appModel and deploy in the build tool | 1.51.0 |
WklBarcode, WklImage; public documentation in the release package | 1.52.0 |
Shortcut menu assignments in WklRibbon (ShowAssignments, ApplyAssignments, EnsureMenus), built-in commands by idMso | 1.53.0 |
User interface in English, German, Slovenian, Croatian, and Italian; language per application (language in the application model) | 1.54.0 |
Windows wider than 22 inches: WklDockLayout with anchors from the design, WKL controls on pages wider than 22 inches; the application shell fills wide windows | 1.54.1 |
Trust check for an application file (WklApplication.CheckTrust, TrustReport, Test-AccessTrust.ps1), WklApplication.Version and Build, INSTALL.txt in every delivery folder of the build tool | 1.55.0 |
Bootstrapper 1.0 in the package (bootstrapper\), the USysWklShellNavigation navigation table in the shell template, the Riviera color table (themes\riviera.md) | 1.56.0 |
Shell template: AppShell_CanClose and AppShell_Closed when the shell closes, bar entries without a page go to AppShell_Command; the trace guide no longer empties the registry key | 1.56.1 |
Labels followed by a value keep their space in English, Slovenian, Croatian, and Italian; bootstrapper 2.0 and registration.json in the package | 1.56.2 |
Files and folders dragged from File Explorer onto WklGrid, WklTreeList, WklGantt, and WklTreeView (AllowFileDrop, FileDragOver, FileDrop); start module messages in five languages | 1.57.0 |
WklActionBar.Logo (an image at the left of the band, AppShell_Logo() in the shell template); the shell template's subtitle is visible; hand-written ribbons can be taken over into the ribbon designer | 1.58.0 |
WklActionBar.SubtitleForeColor (a separate subtitle color; -1 follows ForeColor), AppShell_SubtitleColor() in the shell template | 1.59.0 |
Fixes: grid error marks are always red, Yes/No in the first grid column shows as a check box, CommandStateChange after a state the program read, keys reach the focused child window of a control, and the build tool warns when a reference records a newer version than declared | 1.59.1 |
Fixes: CommandStateChange also for a grid without a window of its own (in an area of a WklDockLayout in a hidden runtime); documentation organized by component type | 1.59.2 |
WklTimerList (delayed and periodic tasks, a rate-limited queue of web requests), WklChart | 1.60.0 |
Format rule wrkColorScale (heat map); WklChart and gauges in reports with PrintStyle; the shell template as an SDK project; fixes: group order in WklTreeList when sorted by the tree column, screen position of the entries in the list view of WklGrid | 1.62.0 |
WklMap; fix: the COM trace no longer writes field values | 1.63.0 |
Column filter in WklTreeList and WklGantt (filter row, value list in the column header, filter bar, FilterIncludesChildren); fix: WklGrid.ColumnFilterValues with several values | 1.64.0 |
Fix: Access no longer crashes some minutes after VBA changed the access key of a WklButton or WklActionBar in form view | 1.64.1 |
WklTexts (texts of the application by key in the language of the components, standard texts wkl.*, language for a test session) | 1.65.0 |
Captions with keys (@orders.title) in WKL controls and the ribbon model; WklTexts.Localize for forms and reports, WklTexts.CaptionText | 1.66.0 |
Neutral texts, application texts in any language, language folder i18n (WklTexts.Folder, also for Excel and Word) | 1.67.0 |
Fixes: WklDockLayout no longer lays an area over its neighbors when an area asks for more room than the window has, and with FillSection Access no longer stays busy in that case | 1.67.2 |
Fixes: WklDockLayout also widens a form shown in a subform control when an area asks for more room than the window has; the package carries the control block of WklMap | 1.67.3 |
WklMap: part of the world (Extent, VisibleExtent), zoom and pan by the user (AllowZoom, ExtentChanged), finer borders for a region, a color field of its own (ColorField, ColorRange, ColorFormat); fix: WklTexts and the other objects made with CreateObject find Access also while the startup form opens | 1.68.1 |
Fixes: Ctrl+C, Ctrl+X, Ctrl+V and Ctrl+Z work in the cell editors of WklGrid, WklTreeList and WklPropertyGrid and in the other text fields of the controls; Ctrl+C on a cell copies the cell or the selection; a drop-down list opens only below its cell | 1.68.2 |
WKL Access Components is now WKL Forms Object Library (reference WKL Forms 1.68 Object Library; ProgIDs, files and type library unchanged); the controls report this name as application name (OLEClass); add-in tools with English names; messages reviewed for their reader | 1.68.3 |
Major version 2: the library is called WklForms (reference WKL Forms 2.0 Object Library, ProgIDs WklForms.*, start module Wkl.Forms.ObjectLibrary.dll); class IDs and members of 1.68 unchanged; registering 2.0 removes 1.x (How to: Move an application to release 2.0) | 2.0.0 |
Security fixes (Security and manufacturer obligations): the controls no longer claim to be safe for scripting and initialization (on an Excel UserForm, Cancel in Microsoft Forms' question about unsafe controls now loads them with their default values); WklImage refuses image files over 64 MB and bitmaps of more than 40 million pixels, LoadFromFile and ImportFromProject refuse files over 64 MB; with AutoStart:=True the exports accept only the file extension of their format; XML with a document type definition (DTD) is refused; Windows libraries are loaded from System32 only | 2.0.1 |
Which version is registered. Only one version per bitness is registered at a time: registering a release removes the registration of every other version of the library for that user, so a database never picks up an older copy. To find out which version is registered:
- In the VBA editor, Tools › References shows WKL Forms x.y Object Library for a database that uses the controls.
In VBA:
Dim r As Reference For Each r In References If r.Guid = "{A37D549E-FCD0-48EC-8B14-C7323B747E4F}" Then Debug.Print r.Major & "." & r.Minor, r.FullPath Next- The components report their release themselves:
WklApplication.Versionreturns it (1.55.0), andWklApplication.Buildreturns the release, a plus sign, and the full commit ID of the source (1.55.0+ce4b826c...). IncludeBuildin bug reports. - In the file properties (Details tab),
Wkl.Forms.ObjectLibrary.dllshows the release as the file and product version, andWkl.Forms.ObjectLibrary.Managed.dllshows the release with the commit ID as the product version. A build from uncommitted source carries no commit ID; a release package is always built from the commit its tag points to.
Compatibility guarantee. Once released, members with their DISPIDs and classes with their GUIDs never change and are never removed. New releases only add, and every addition raises the type library version. Forms store the settings of their WKL controls in the form (OleData); a newer release reads settings stored by an older one, and settings that a newer release adds get their default value in forms saved with an older one. A fix release (z) changes no members.
A database that references an older version keeps working with a newer registration of the same major version:
Access resolves the reference to the registered library when the database opens. Release 2.0 starts a new major
version with the library name WklForms: a database built against 1.x has to be moved once
(How to: Move an application to release 2.0). Before the database uses
members of the newer release, compile it again (Debug › Compile) and create a new ACCDE. The
reverse doesn't work: a database built against a newer release doesn't run with an older
registration. The reference is broken (MISSING), and Access reports error 459 or “Object library
not registered.” Install the components first, then the database
(How to: Deploy an application with WKL controls to user PCs).
Excel and Word UserForms behave differently: Office keeps its own copy of the library for each
version from the first time it's used, which is why every interface change raises the version.
Major version 2.0. Resolving a reference to a newer registration is supported only within its major version.
Access does bind the reference of a database for 1.x to release 2.0 through the same library ID, but the ProgIDs
WklComponents.* are no longer registered then. Release 2.0
renamed the library from WklComponents to WklForms, the ProgIDs from WklComponents.* to WklForms.* and the
start module to Wkl.Forms.ObjectLibrary.dll. Members, DISPIDs and GUIDs are those of 1.68, and forms keep their
controls. Move an application for 1.x once
(How to: Move an application to release 2.0).
Supported environments
Support by control, all in Access from Microsoft 365:
| Control or object | ACCDB | ACCDE | Access Runtime | Excel and Word UserForms |
|---|---|---|---|---|
WklTreeView, WklTreeList | Supported | Supported | Supported | Basic use |
WklGantt, WklGrid | Supported | Supported | Supported | Basic use |
WklSplitter, WklDockLayout | Supported | Supported | Supported | Basic use |
WklStatusLabel, WklNavBar, WklButton | Supported | Supported | Supported | Basic use |
WklToggleSwitch, WklTokenBox, WklBadge, WklToast | Supported | Supported | Supported | Basic use |
WklValidator | Supported | Supported | Supported | Not supported (checks Access forms) |
WklLinkManager | Supported | Supported | Supported | Not supported (links Access tables) |
WklPropertyGrid | Supported | Supported | Supported | Basic use |
WklButtonEdit, WklSpinEdit | Supported | Supported | Supported | Basic use |
WklGauge, WklKpiCard | Supported | Supported | Supported | Basic use |
WklActionBar | Supported | Supported | Supported | Basic use |
WklDrawer | Supported | Supported | Supported | Not supported (places an Access subform control) |
WklRibbon (including shortcut menu assignments) | Supported | Supported | Supported | Not supported (Access ribbons) |
WklNavPane | Supported | Supported | Supported (writes the rows; the runtime shows no Navigation Pane) | Not supported (Access Navigation Pane) |
| Application shell template | Supported | Supported | Supported | Not supported (Access forms) |
WklApplication | Supported | Supported | Supported | Not supported (Access startup properties) |
WklBarcode, WklImage (also in reports: print preview and PDF) | Supported | Supported | Supported | Basic use |
WklTimerList | Supported | Supported | Supported | Basic use |
WklChart | Supported | Supported | Supported | Basic use (no data: it reads data through Access) |
“Basic use” on Excel and Word UserForms means that you can insert the control on a UserForm, bind it to its data, use it from VBA, and save it with the UserForm; anything beyond that isn't supported on UserForms.
Editing and saving: prerequisites
WklTreeView, WklTreeList, WklGantt, and WklGrid write each user change (a rename, a move, a
cell, a check mark, a new, copied, or deleted record) to the RecordSource immediately
(AutoSave = True, the default). Whether that succeeds depends on the record source.
- The record source must be updatable in Access. To check, open it as a datasheet and try to change a value. A table, a select query on a single table, and SQL text as the
RecordSourcecan be saved to; a UNION query, a query withGROUP BY, a pass-through query, and a linked ODBC table without a unique index reject the write withwkeSourceError(&H80040302): “The change (Rename) to the node 2 could not be saved in “qUnion”: Cannot update. Database or object is read-only.” Nothing is saved, and the node keeps the text from the source. - Fields the source can't write don't open an editor (
WklGrid,WklTreeList,WklGantt,WklPropertyGrid). WithAutoSave = True, the list checks the source once: DAO'sUpdatableandDataUpdatable, AutoNumber fields, and, for a linked ODBC table, the driver (IDENTITY, computed, and rowversion columns). Such cells behave asReadOnly. WithAutoSave = False, nothing is turned off, because the application writes the change itself. Adding, deleting, renaming inWklTreeView, and dragging stay enabled: the rejection appears only when the change is saved. For a user's change, the transaction is rolled back, the tree reloads,DataErrorfires with the text above, and a message box follows unlessDataErrorsetsResponsetoacDataErrContinue(0). For a source that can't be updated, turn editing off:AllowEditing = False(LabelEdit = FalseinWklTreeView),AllowAdditions = False,AllowDeletions = False, and no drag and drop. KeyFieldmust identify a single record. The record is located by its key: with SQL (SELECT * FROM [source] WHERE [key] = …) for a table or query, and withFindFirstin the dynaset for SQL text. A key that occurs twice rejects the write withwkeDuplicateKey(&H80040303): “The key 2 occurs more than once in the data source. KeyField must identify each record uniquely.” Nothing is saved. A composite key is written asKeyField = "OrderID;LineNo"; its fields are combined in the same condition withAND.- Linked ODBC tables (SQL Server, Wkl OData) need a unique index in Access, which Access takes from the primary key when you link the table. A linked SQL Server table with a primary key can be saved to; the same table without any index is read-only and rejects writes as described above. The control opens its dynaset with
dbSeeChanges, which SQL Server tables with an IDENTITY column require. Through the Wkl OData driver, a table also needs a row version to be writable, whatever its key type. Without one, Access locates the record by comparing all old values (UPDATE … WHERE Id = ? AND Name = ?). The service doesn't offer that comparison for a table with a key, and the driver doesn't drop it either, so the write is rejected withwkeSourceErrorand the driver's message that the condition onNamecan't be translated because the service doesn't offer a comparison with the old value. To fix this, add arowversioncolumn to the table or turn on the service's row stamp for the table (see the service documentation), and then relink the table. - One transaction, one place. All writes for a single user action run in a transaction of the default DAO workspace, including the cell editor of
WklTreeList(BeforeUpdatewithAction = wuaCellValue).CancelinBeforeUpdateor a rejection by Access rolls back the entire action and reloads the tree. Writes your own code makes throughCurrentDbinsideBeforeUpdatebelong to the same workspace and are rolled back with it.CancelinValidateCellcomes before any write: the editor closes and the cell keeps its old value. - One record source for all nodes. A tree whose node types come from several tables through a UNION query can't be edited in place, because there's no mapping from node type to table. Edit such a tree through forms instead:
EditFormsopens the Access form for the selected node's type (sourceKeysnames the key of the record behind it, anddeleteFromthe table to delete from; see How to: Edit records in a form). Alternatively, setAutoSave = Falseand save the change yourself: the tree then changes only its display and raises noBeforeUpdate, and your handler forValidateCell,AfterLabelEdit,NodeDrop, orBeforeDeletewrites the record by its key. SetCancelthere if your write fails.
Limitations and known issues
Trust. Some members write files (SaveToFile, Export…, SaveImage), open files (AutoStart),
and read files named in stored properties (WklImage, including from a network share). The controls
therefore don't claim to be safe for scripting and initialization (up to 2.0.0 they did). Use them only
in databases and workbooks from trusted locations. On an Excel UserForm, Microsoft Forms asks when the
workbook opens, even from a trusted location, whether to initialize the controls: OK gives them
their saved settings, Cancel their default values.
Where you can place a control on a form (each component's page describes its own workaround):
| Location | What happens | Workaround |
|---|---|---|
| Detail section of a continuous form, unbound | Access creates one instance that shows only the current record; the other rows stay empty | A WklGrid column (status, toggle, tokens, commands) |
| Detail section of a continuous form, bound (Control Source) | Access doesn't finish opening the form | As above; a bound control works in the form header or footer |
| Behind or on top of a subform | Access draws a subform over every ActiveX control (including WklBadge) | Place the control next to the subform, or on the subform's own form |
| Report | A notice instead of data | Grouping levels and subreports; export the list |
| Disabled (Enabled = No) | Access gives a disabled ActiveX control no window; it's drawn as an image and doesn't respond to the mouse or keyboard | – |
- Reports: on a report, the lists (
WklTreeView,WklTreeList,WklGantt,WklGrid,WklPropertyGrid) show a notice instead of data.WklBarcodeandWklImageare designed for reports (a bound control draws each record's value in print preview and in PDF); the other controls aren't supported on reports. Build hierarchical reports with grouping levels and subreports, and use a list's export to take its view out of Access. - Supported: 32-bit and 64-bit Access. The VBA modules that the components write (
basWklRibbon, the build tool's module, the add-in) declare no API functions, so there's noPtrSafeto adjust. - High-DPI settings aren't supported.
- Drag and drop works only within the same control: nodes in
WklTreeView,WklTreeList, andWklGanttmove or copy within their own tree; rows inWklGridcan't be dragged (it accepts only files from File Explorer). Dragging records from one control onto another, such as dropping many selected people onto a rule in a second list, isn't possible. Instead, let the user select withMultiSelect, readSelectedKeys, and run the assignment from a command (aWklButton, a shortcut menu command, orRowCommand), taking the target key from the other control'sSelectedKey. Copying nodes doesn't copy attachment or multivalued fields. AutoSavewrites only to aRecordSourcethat Access can update, with aKeyFieldthat identifies a single record. A UNION,GROUP BY, or pass-through query and a linked table without a unique index reject the write when the change is saved, not before. There's no mapping from node type to table. A tree loaded from aRecordsetor from a file has no source to write back to. See Editing and saving: prerequisites.- The
Filterof a bound control is a WHERE condition on the data source and queries it each time; for a pass-through query, the whole query runs on the server. - In UI Automation, Access doesn't list an ActiveX control's window as a child of its form. Screen readers reach the grid through the focus, but searching the Access element tree doesn't find it.
NodeFormatandCellFormatfire only whenFormatEvents = True. Every event call into Access takes a few milliseconds, which add up for every visible node or cell on every repaint.- Export: XLSX, XML, and JSON;
WklGanttalso writes images, PDF, and Microsoft Project XML. Other formats (XLS, CSV, and so on) aren't part of the controls: open the XLSX file in Excel and save it in the format you need, manually or with a few lines of VBA. The formatted Excel export omits data bars and icon sets, and, forWklGantt, dependency arrows, baselines, and deadlines (they have no cell equivalent). WklGantt: text in the PDF is part of the image and can't be searched. Microsoft Project XML follows the Project 2007 schema: manual scheduling, the gaps in split tasks, and the chart's appearance aren't exchanged. The Project files follow Microsoft's published schema and the Project 2010 file format; opening them in Microsoft Project itself isn't supported.
Licensing
The controls and objects contain no license check: no license key and no check in design view or at run time, including in the Access Runtime and on Excel and Word UserForms. A database that uses them runs on any PC where the release is installed and registered (How to: Deploy an application with WKL controls to user PCs). The terms of use are those of your agreement with the supplier.