Hi
I was hoping someone might be able to help me learn how to script a little bit more efficiency.
I have a subform with ten check boxes contained in it. I also have a seperate button. What I want to do is when the button is clicked all the fillcolours of the checkboxes changed. I can do this by just writing a line of script in the button for each check box but is there a more efficient way to do this?
Thanks
Darren
Solved! Go to Solution.
Views
Replies
Total Likes
There are more generic ways of doing this ....like getting a list of objects on the page or subform and cycling through each object one by one and setting a property but ultimately you are accessing each object one by one and changing it. The method I mention can be made into a function and has the advantage of dealing with few or many objects. I have included a sample that locks all fields in a given container (in this case it is the entire form, but you can pass in a subform name and only that subform woudl be locked). It is not exactly what you want but it shodul give you the idea.
Paul
Views
Replies
Total Likes
There are more generic ways of doing this ....like getting a list of objects on the page or subform and cycling through each object one by one and setting a property but ultimately you are accessing each object one by one and changing it. The method I mention can be made into a function and has the advantage of dealing with few or many objects. I have included a sample that locks all fields in a given container (in this case it is the entire form, but you can pass in a subform name and only that subform woudl be locked). It is not exactly what you want but it shodul give you the idea.
Paul
Views
Replies
Total Likes
Thanks for this Paul and I will work through it.
Best wishes
Darren
Views
Replies
Total Likes