'Exclude Form Control from Form Event
In a form event, such as Before Update, On Dirty, On Change, etc., is there any way in the VBA to exclude a specific form control from a procedure? For example, if you are setting a message to appear in the On Dirty part of a form, can you tell Access to ignore when one specific combobox is dirty and only show a message when anything else BUT that combobox is dirty?
Of course you can just set the On Dirty for every single form control individually to show a message EXCEPT that combobox, but that is a lot of work if you have many controls. I was wondering if it's possible to just have an exclusion criteria in the form event code instead, to catch everything BUT the one control you're excluding.
Solution 1:[1]
A control with purpose of providing means to type/select filter/navigation criteria, not for data entry, should be UNBOUND. If it is BOUND, it will change data in record. An UNBOUND control does not cause form/record to become dirty (edit state) - it is 'ignored'. Do not set ControlSource property.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | June7 |
