Hi, Ofer.
I agree with you. However, the examples I provide serve two additional
purposes, so I typically don't give examples that are identical to the way I
write code. (As I'm sure you write error handling into your code, yet you
don't provide it in your examples.) The two additional purposes are for
future researchers and for teaching new coders.
You'll notice that each procedure is self-contained, in that it requires no
additional code to make it work. Many people search the archives for
previously answered questions for solutions, hoping to find exactly what
they need. Much of the time, the discovered code is "close," but not "close
enough." These folks can take what they need and manipulate it further, but
they don't necessarily have to copy all of the code provided, nor hunt for
more of the necessary pieces in order to get something that works.
The other purpose is for teaching new coders. I try to provide the code at
it's simplest, so there's as little confusion as possible. And while many
of the people requesting help in the newsgroups will just blindly copy and
paste whatever they're given, some will examine the code to try to
understand it. If they do, they'll usually notice something important --
which I never mention when I offer the code. If the questioner replies back
with a comment or a question about the code, then I know they've tried to
learn something and I can offer more.
It's the concept: Give a man a fish and he'll eat for a day. Teach a man
to fish and he'll eat for a lifetime. With enough working examples and
practice, these folks won't be asking for help from others. They'll be
giving it.
Gunny
See
http://www.QBuilt.com for all your database needs.
See
http://www.Access.QBuilt.com for Microsoft Access tips.