Counting Empty Text Boxes - Nifty Access
A recent question on Access World Forums provided me the opportunity to demonstrate a new variation on one of my favourite coding methods with MS Access VBA:-
“For Each Control in Me.Controls”.
This technique allows you to look at each control on your Access Form in turn, make a decision about the control, and/or change the controls properties. You now have access to a World of possibilities!
Notice that not only does this method facilitate counting the empty controls, but it also allows you to modify a Control by changing its Properties.
In this example, I change the border colour to Red “vbRed” and the background colour to yellow “vbYellow” this highlights the Controls on the Form that are NULL.
You get a sample MS Access database ready set up. I love the freemium model and I endeavour to make sure there's a free version of most of my work. And for this particular product you can have the code for free by going to the Access World Forum website...