WklSpinEdit
WklSpinEdit is a number box with up and down arrows, limits, a step size, and an optional unit, for
values such as a session length in hours or a key's lifetime in days. You bind it like an Access text
box, and it's saved with the record. The same editor is available as a column type in WklGrid,
WklTreeList, and WklGantt (Editor = wedSpin).
Get started
None
Common tasks
Visual aid
+- frmKey: Form View --------------------------------------------------+ | Key lifetime [ 365 days |^|] | 1 2 | [ |v|] | | Session length [ 7.5 hrs |^|] | 3 | [ |v|] | +----------------------------------------------------------------------+
| Region | Meaning |
|---|---|
| 1 | The number with its unit (Unit “days”), bound through Control Source just like a text box |
| 2 | The arrows: one Step up or down, never past MinValue/MaxValue |
| 3 | A number with decimal places (Step 0.5, DecimalPlaces 1) |
Key features
- Binds like a text box: Access writes the field to
Valuewhenever the record changes; the user's change marks the record as dirty and is saved with it; an empty field is Null; and Esc undoes the change. - Never outside the limits: the arrows, Up/Down (one step), Page Up/Page Down (ten steps), and the mouse wheel all stop at
MinValueandMaxValue. - Rejected like a validation rule: typed text that isn't a number or is outside the limits isn't saved. When the user leaves the field, the value from before the edit comes back, and
InvalidEntrytells the form why. - A unit after the number:
Unitis display text only; the field stores just the number. - Screen readers announce a spinner named by
Caption, with its range (UI Automation RangeValue), a real edit field, and two real buttons.
Core concepts
Access saves the field, just as for a text box. The control reports each valid change to Access,
which marks the record as dirty and copies the control's value to the field when the record is
saved. A value set in code (Value) is only displayed.
The limits check user input, not stored data. A value from the record or from code is shown as is, even if it's outside the limits, just as an Access field's validation rule doesn't check data that's already stored.
Access keeps its own properties. Enabled, Locked, Visible, TabStop, and the tooltip are the standard properties that Access gives every control.
Administration
Troubleshooting
None
For developers
Related topics
None