WklToast
WklToast shows short notes after an action at the bottom right of the Access window or of a
form, as Outlook and Teams do: they never take the focus, close by themselves and can offer one
action such as Undo. It is an object created with New, not a control.
Get started
Common tasks
Visual aid
+- Access ----------------------------------------------------------------+ | frmRules | | ... | | +-------------------------------+ | | | (i) 2 rules exported. x | | 1 | +-------------------------------+ | | | (v) Rule deleted. x | | 2 | | Undo | | 3 | +-------------------------------+ | +-------------------------------------------------------------------------+
| Region | Meaning |
|---|---|
| 1 | An older note (wtkInfo); it closes by itself after 4 seconds |
| 2 | The newest note at the bottom (wtkSuccess), with its close button |
| 3 | The action of the note (ActionCaption): mouse, Enter, Ctrl+Shift+Z or a screen reader run it |
Key features
- From any module: a form, a subform, a standard module; no control on the form.
- Four kinds (
WklToastKind) with color and symbol, an optional bold title. - One action per note with a
Tagthat comes back: the eventAction, or an expression (ActionFunction) that runs even when the object is gone. - Never in the way: no focus, no keyboard taken; at most three visible, further notes wait; 4 seconds, 8 with an action, paused under the mouse.
- Keyboard: Ctrl+Shift+Z runs the newest action; F6 enters the newest note once, as F6 reaches the message bar in Office; Esc closes it.
- Screen readers hear each note once when it appears, with the key of its action.
Core concepts
A note belongs to the application. The notes of an Access session share one corner and one
queue; Close, CloseAll and Count act on all of them, whichever object showed them. With
Form, notes stand in the corner of that form and close with it.
Events need a module-level variable. VBA delivers Action and Closed only to a variable
declared WithEvents on module level of a form, report or class. For a note shown from a
procedure that ends, name a function in ActionFunction.
A note, not a dialog. Errors and decisions that need an answer belong in a message box: a note disappears.
Administration
Troubleshooting
For developers
Related topics
None