Pages

Sunday 3 February 2013

Lock UnLock Controls


A problem that crops up from time to time is the need to handle a group of controls differently from the rest of the controls of form.

Usually this is the need to lock the controls so that data cannot be changed, and conversely unlock them. However it may be the need to change the back color or some other attribute of the controls.


And as I struggle to find suitable topics for Blogs, I realized this would make a good topic, particularity a as I have done most of the work already!


Video 1 --- Demonstration of a simple function that Locks or Unlocks controls on an MS Access Form, depending on whether you pass it a true or false boolean value.

 

Video 2 --- Demonstrates the method of naming the controls with a particular set of characters to identify them as belonging to a particular group.

 

Video 3 --- Demonstrates how to set particular controls values, (a group of similar controls) by looping through the collection of controls on an MS Access Form.

 


Video 4 --- Demonstrates how to replace two command buttons which switch between a lock and unlock state as in this case, and replace the two command buttons with a single command button and some code.


 


Video 5 --- Demonstrates how to setup command buttons to call a class module, the class module can then execute identical code for every button that calls it from your form.



Video 6 --- Demonstrates how to have your Command Buttons access the code in a Class Module through a function in the code behind the form.





Video 7 --- Overview of a Class that is used with an MS Access Form. This class enables multiple Command Buttons to perform basically the same action.






No comments: