Color scheme: Dark
You are here: start » en » Documentation » Microsoft Access development tools » WKL Forms Object Library » WKL Forms Object Library: controls for Access forms

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

ScenarioControl
Show a hierarchy from a table (organization chart, bill of materials, folders) and edit it with drag and dropWklTreeView, WklTreeList
A list of records with grouping, a filter row, totals, master-detail, and a million rows from a serverWklGrid
Edit a single record as a property list next to a listWklPropertyGrid
Plan tasks with dependencies and a work calendar, and exchange plans with Microsoft ProjectWklGantt
An application shell with navigation on the left, a header with commands, and pages that fill the windowWklNavBar, WklActionBar, WklDockLayout
Check input against rules before the record is saved, with the message next to the fieldWklValidator
Link tables to development, test, and production servers and switch between themWklLinkManager
Show a series of measurements with its limits and trend, or counts per monthWklChart
Show where things happen: sign-ins per city, sites, or customers on a world mapWklMap
Search as the user types, refresh a counter every 30 seconds, send many web requests at the rate a service allowsWklTimerList
Measure and display a key metric, a status, or a countWklGauge, 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

Common tasks

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
RegionMeaning
1The release: the controls for the bitness of Office, the build tool, the WKL Extensions add-in, and the control blocks
2The files, copied to a permanent folder and registered for the current Windows user
3Access offers the controls and the type library; inserting a control sets the reference automatically
4You 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.

ComponentPurposeDocumentation
WklGridA flat datasheet with grouping, column filters, master-detail, detail views, a server mode for large tables, and a list view.overview · reference
WklTreeViewA tree bound to a table, query, or SQL statement, with editing, drag and drop, search, and filtering.overview · reference
WklTreeListA hierarchical datasheet: the tree with columns, cell editors, formatting, totals, and export to Excel.overview · reference
WklGanttA Gantt chart next to the datasheet, with dependencies, a work calendar, scheduling, and exchange with Microsoft Project.overview · reference
WklPropertyGridA single record as “caption · value” rows grouped in categories, on a form of its own or as a detail view.overview · reference
WklChartA line, scatter, column, or bar chart of a table or query that follows the current record, with limits, bands, and a trend.overview · reference
WklMapPoints 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.

ComponentPurposeDocumentation
WklToggleSwitchA Yes/No switch that takes effect immediately, bound like a check box.overview · reference
WklTokenBoxSeveral values of a record shown as tokens with suggestions and stored in a child table.overview · reference
WklButtonEditA 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
WklSpinEditA 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
WklValidatorChecks 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.

ComponentPurposeDocumentation
WklDockLayoutArranges the areas of a form in zones every time the form is resized, with splitters and tab groups.overview · reference
WklSplitterA splitter between two areas of a form that the user can drag or use to collapse one side.overview · reference
WklDrawerA 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

Move around an application and run its commands.

ComponentPurposeDocumentation
WklNavBarThe navigation bar of an application shell, filled by code or from a navigation table.overview · reference
WklActionBarThe 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
WklButtonA 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.

ComponentPurposeDocumentation
WklStatusLabelA one-line status: text with a kind that sets its colors, bound like a text box.overview · reference
WklBadgeA 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
WklGaugeA value on a scale with colored ranges: half or three-quarter circle, horizontal or vertical bar, or several bars with a legend.overview · reference
WklKpiCardA 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.

ComponentPurposeDocumentation
WklBarcodeA QR code, Code 128, or Data Matrix symbol for a text, bound like a text box; in reports, one code per record.overview · reference
WklImageAn 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.

ComponentPurposeDocumentation
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
WklTimerListScheduled 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.

AreaPages
InstallationThe .NET 10 Desktop Runtime is not installed · A WKL control or the reference is missing (wrong bitness) · Access reports that another .NET version is loaded · The application opens but its code does not run
All controlsTexts appear in another language than expected · An event procedure is never called · Access stops responding after a delete or an error · Reading a linked ODBC table never returns · The control shows error text instead of nodes · Design view shows sample nodes instead of the data · The control's events are missing from the Event tab · "Method or data member not found" for a control on a UserForm · Copy and paste fail after many Access sessions · UI Automation finds only the Access form, not the WKL control
Editing and savingA cell can't be edited · Changes in the tree aren't saved · A data service rejects a change · The form becomes slow after handling NodeFormat or CellFormat
WklGridTotals stay empty in server mode · An Access subform doesn't follow the grid
WklGanttThe timeline shows no bars · Importing a Project file adds the tasks again
WklLinkManagerThe Linked Tables Manager can't tell the profile · Tables aren't linked at startup · The add-in entry is missing
LayoutA control isn't arranged by the layout · The layout stays wide after the window shrinks
WklNavBarThe navigation bar opens in another mode than designed · The navigation shortcut does nothing · Entries from the navigation table are missing
WklNavPane, WklRibbon, WklApplicationThe navigation pane shows more than the model · The ribbon doesn't appear after saving · A startup option doesn't take effect
WklStatusLabelThe status label shows nothing or the wrong color
WklButton, WklToggleSwitchA disabled button or switch is not drawn
WklValidatorThe validator checks nothing · A refused save does not show in the validator's summary
WklTokenBoxTokens cannot be added to the token box
WklToastA note's action does nothing, or no note appears
WklBadgeThe badge doesn't appear, or not on its target

For developers

  • CHANGELOG.md in 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 objectSince release
WklTreeView, WklTreeList, WklGantt, WklGrid, WklSplitter, WklDockLayout, WklStatusLabel, WklLinkManager1.23.0
WklNavBar1.24.0 (navigation table: 1.26.0)
WklButton1.26.0 (split and segmented buttons, badge: 1.27.0)
WklValidator1.31.0
WklToggleSwitch1.32.0
WklTokenBox1.33.0
WklToast1.34.0
WklBadge1.35.0
WklGrid list view1.36.0
WklDockLayout tab groups1.37.0
WklPropertyGrid1.38.0
WklButtonEdit, WklSpinEdit1.43.0
WklGauge, WklKpiCard1.44.0
WklActionBar1.46.0
ColorScheme for every control and for WklToast; EditOnClick for the grids1.47.0
WklDrawer1.48.0
WklRibbon and the ribbon designer1.49.0
WklNavPane, the navigation pane designer, and the application shell template1.50.0
WklApplication, the application designer, and appModel and deploy in the build tool1.51.0
WklBarcode, WklImage; public documentation in the release package1.52.0
Shortcut menu assignments in WklRibbon (ShowAssignments, ApplyAssignments, EnsureMenus), built-in commands by idMso1.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 windows1.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 tool1.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 key1.56.1
Labels followed by a value keep their space in English, Slovenian, Croatian, and Italian; bootstrapper 2.0 and registration.json in the package1.56.2
Files and folders dragged from File Explorer onto WklGrid, WklTreeList, WklGantt, and WklTreeView (AllowFileDrop, FileDragOver, FileDrop); start module messages in five languages1.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 designer1.58.0
WklActionBar.SubtitleForeColor (a separate subtitle color; -1 follows ForeColor), AppShell_SubtitleColor() in the shell template1.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 declared1.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 type1.59.2
WklTimerList (delayed and periodic tasks, a rate-limited queue of web requests), WklChart1.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 WklGrid1.62.0
WklMap; fix: the COM trace no longer writes field values1.63.0
Column filter in WklTreeList and WklGantt (filter row, value list in the column header, filter bar, FilterIncludesChildren); fix: WklGrid.ColumnFilterValues with several values1.64.0
Fix: Access no longer crashes some minutes after VBA changed the access key of a WklButton or WklActionBar in form view1.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.CaptionText1.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 case1.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 WklMap1.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 opens1.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 cell1.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 reader1.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 only2.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.Version returns it (1.55.0), and WklApplication.Build returns the release, a plus sign, and the full commit ID of the source (1.55.0+ce4b826c...). Include Build in bug reports.
  • In the file properties (Details tab), Wkl.Forms.ObjectLibrary.dll shows the release as the file and product version, and Wkl.Forms.ObjectLibrary.Managed.dll shows 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 objectACCDBACCDEAccess RuntimeExcel and Word UserForms
WklTreeView, WklTreeListSupportedSupportedSupportedBasic use
WklGantt, WklGridSupportedSupportedSupportedBasic use
WklSplitter, WklDockLayoutSupportedSupportedSupportedBasic use
WklStatusLabel, WklNavBar, WklButtonSupportedSupportedSupportedBasic use
WklToggleSwitch, WklTokenBox, WklBadge, WklToastSupportedSupportedSupportedBasic use
WklValidatorSupportedSupportedSupportedNot supported (checks Access forms)
WklLinkManagerSupportedSupportedSupportedNot supported (links Access tables)
WklPropertyGridSupportedSupportedSupportedBasic use
WklButtonEdit, WklSpinEditSupportedSupportedSupportedBasic use
WklGauge, WklKpiCardSupportedSupportedSupportedBasic use
WklActionBarSupportedSupportedSupportedBasic use
WklDrawerSupportedSupportedSupportedNot supported (places an Access subform control)
WklRibbon (including shortcut menu assignments)SupportedSupportedSupportedNot supported (Access ribbons)
WklNavPaneSupportedSupportedSupported (writes the rows; the runtime shows no Navigation Pane)Not supported (Access Navigation Pane)
Application shell templateSupportedSupportedSupportedNot supported (Access forms)
WklApplicationSupportedSupportedSupportedNot supported (Access startup properties)
WklBarcode, WklImage (also in reports: print preview and PDF)SupportedSupportedSupportedBasic use
WklTimerListSupportedSupportedSupportedBasic use
WklChartSupportedSupportedSupportedBasic 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 RecordSource can be saved to; a UNION query, a query with GROUP BY, a pass-through query, and a linked ODBC table without a unique index reject the write with wkeSourceError (&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). With AutoSave = True, the list checks the source once: DAO's Updatable and DataUpdatable, AutoNumber fields, and, for a linked ODBC table, the driver (IDENTITY, computed, and rowversion columns). Such cells behave as ReadOnly. With AutoSave = False, nothing is turned off, because the application writes the change itself. Adding, deleting, renaming in WklTreeView, 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, DataError fires with the text above, and a message box follows unless DataError sets Response to acDataErrContinue (0). For a source that can't be updated, turn editing off: AllowEditing = False (LabelEdit = False in WklTreeView), AllowAdditions = False, AllowDeletions = False, and no drag and drop.
  • KeyField must identify a single record. The record is located by its key: with SQL (SELECT * FROM [source] WHERE [key] = …) for a table or query, and with FindFirst in the dynaset for SQL text. A key that occurs twice rejects the write with wkeDuplicateKey (&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 as KeyField = "OrderID;LineNo"; its fields are combined in the same condition with AND.
  • 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 with wkeSourceError and the driver's message that the condition on Name can't be translated because the service doesn't offer a comparison with the old value. To fix this, add a rowversion column 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 (BeforeUpdate with Action = wuaCellValue). Cancel in BeforeUpdate or a rejection by Access rolls back the entire action and reloads the tree. Writes your own code makes through CurrentDb inside BeforeUpdate belong to the same workspace and are rolled back with it. Cancel in ValidateCell comes 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: EditForms opens the Access form for the selected node's type (sourceKeys names the key of the record behind it, and deleteFrom the table to delete from; see How to: Edit records in a form). Alternatively, set AutoSave = False and save the change yourself: the tree then changes only its display and raises no BeforeUpdate, and your handler for ValidateCell, AfterLabelEdit, NodeDrop, or BeforeDelete writes the record by its key. Set Cancel there 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):

LocationWhat happensWorkaround
Detail section of a continuous form, unboundAccess creates one instance that shows only the current record; the other rows stay emptyA WklGrid column (status, toggle, tokens, commands)
Detail section of a continuous form, bound (Control Source)Access doesn't finish opening the formAs above; a bound control works in the form header or footer
Behind or on top of a subformAccess draws a subform over every ActiveX control (including WklBadge)Place the control next to the subform, or on the subform's own form
ReportA notice instead of dataGrouping 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. WklBarcode and WklImage are 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 no PtrSafe to adjust.
  • High-DPI settings aren't supported.
  • Drag and drop works only within the same control: nodes in WklTreeView, WklTreeList, and WklGantt move or copy within their own tree; rows in WklGrid can'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 with MultiSelect, read SelectedKeys, and run the assignment from a command (a WklButton, a shortcut menu command, or RowCommand), taking the target key from the other control's SelectedKey. Copying nodes doesn't copy attachment or multivalued fields.
  • AutoSave writes only to a RecordSource that Access can update, with a KeyField that 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 a Recordset or from a file has no source to write back to. See Editing and saving: prerequisites.
  • The Filter of 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.
  • NodeFormat and CellFormat fire only when FormatEvents = 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; WklGantt also 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, for WklGantt, 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.

en/wiki/msaccess/comctl/overview.txt · Last modified: by Wolfgang van der Stille