I'm trying to add color and the instructions say
"bcg_CreateRectangles "<MyFormName>", False - it says to run this
"subroutine", run it where?
Whoa! This is equivalent to someone handing you a pill and saying, "Swallow
this." Blindly copying and running someone else's code is asking for a lot
of trouble. How are you going to fix the problems it may cause? How are you
going to know what it's going to do to your database application and to your
computer? You don't.
The code you want to run uses significant resources every time the form
(<MyFormName>) opens. The code has a memory leak and running it a few times
to create the rectangles for even a moderate sized form will result in "out
of memory" errors. Future changes to the form will be a hassle because the
significant number of rectangles this code creates are in the way when you
want to move the existing controls around on the form. You'll end up
deleting the rectangles, making your changes, then recreating the rectangles
again. Doing this several times will result in another hassle. The 754
limit for controls, fields, and form sections per form will be reached,
because this number never decreases, even when controls are deleted. And
using this code in Access 2003 will result in odd visual effects.
Instead of blindly running this code you found, I'd recommend that you take
a few courses in Microsoft Access and programming so that you know what's
what -- and what's not good for your database application. Then you can sit
down and fix the code yourself to avoid many of the problems I mentioned.
HTH.
Gunny
See
http://www.QBuilt.com for all your database needs.
See
http://www.Access.QBuilt.com for Microsoft Access tips.
(Please remove ZERO_SPAM from my reply E-mail address, so that a message
will be forwarded to me.)
Beware to those who use munged addresses: known newsgroup E-mail harvesters
for spammers are (e-mail address removed) and (e-mail address removed)
- - -
When you see correct answers to your question posted in Microsoft's Online
Community, please sign in to the Community and mark these posts as "Answers,"
so that all may benefit by filtering on "Answered questions" and quickly
finding the right answers to similar questions. Remember that questions
answered the quickest are often from those who have a history of rewarding
the contributors who have taken the time to answer questions correctly.