The attached utility demonstrates a way of setting the state of a group of controls at the same time using the controls' Tag property.
The properties that can be controlled are: Visible, Enabled, Locked
However, some control types do not allow all of the properties.
For example labels can not be disabled or locked
For full details of control types & properties, see the table tblControlTypes
All the form controls have tags A, B, C or D.
Use the buttons to control the state of those with tags A, B, C
To ensure the form remains usable, controls with tag D remain visible, enabled & unlocked at all times!
The forms aren't intended to be elegant, just to show what can be done
For portability, all the functionality is now included in the module modControlState.
There are 3 procedures: ShowControls, EnableControls & LockControls
2 forms have been included - identical apart from colour
This is just to confirm that the forms are controlled independently as you would expect
In addition, one form demonstrates the use of auto resize code (by Jamie Czernak) for different screen resolutions; the other doesn't
To use this approach, just copy the module modControlState to your own project
When using this code on a form make sure all controls have a tag value.
Otherwise, controls with no tag will get hidden or locked or disabled as well
Click the image to view a larger version ...
The Tag property has a wide range of possible uses in Access applications.
For example, APR Pillai (Learn MS Access Tips & Tricks) uses it to Duplicate Multiple Fields in a record to the next record with conditional formatting