Hi,
My tuppence-worth, if I may.
Some topics already touched-upon by: ClydeDoggie, RedBird, LittleSmudge....
[tt]
*) NEVER use macros - unclear, hard to maintain, document
and debug (I think Clyde advised using macros, although
he also advised using VBA). Macros seem to produce
masses of duplication (as opposed to VBA functions with
arguments). If you don't know VB code, then learn it
quick-style, it'll save a LOT of time.
*) Document EVERYTHING in summary. This includes all table,
form, report descriptions. Include what other objects
that this object refers to also.
Add a description header to all procs/functions, and
comment code. Even if you think it's simple now, when
you come back - you'll be stumped for a while.
*) With Proc's/Functions; if you look at a block of code's
action within a large function and you can imagine a name
for what it's doing, then make it a function in it's own
right and call it from the main.
*) With Proc's/Functions; always think 'generic'. I.e. is it
possible that this function MAY be reqd. by another form
(or other function)? If so - invest a little more time
and use arguments to pass object names rather than 'hard-
coding' them within the code.
*) ALWAYS diagram table relationships - it makes it simple
for a new developer to pick up what the db is about in a
shorter space of time. (We all immediately
understand 'pitchers').
*) Naming conventions are really underused/undervalued,
more because of laziness than anything. (I've 'knocked'
stuff together because my boss was on my back), but then
I've gone back and renamed everything - probably
doubling the time taken.
tbl,frm,rpt,qry,lbl,txt,chk,opt,cmb,lst,cmd all
prefixes, all obvious. Whatever your preference - use it
and stick to the same throughout the app.
For subform names, I use the _sub suffix, but always use
the Parent form name as a prefix. e.g. Parent =
frmFormA, subform = frmForma_Formb_sub. This way, all
sub-forms related to the parent appear under the parent
(if alphabetically sorted).
*) No matter what the pressures; before hitting the
keyboard - visualize not only the current problem /
solution, but also what problems or possibilities it may
lead to. The solution will work as planned, but if you
had thought about it, you could also have saved a lot of
work for the future by pre-empting what else will be
asked for when it's completed by designing your solution
with the 'future possibility' in mind.
Remember - you give the boss the solution he wanted, he
then has his 'pitcher' and then immediately visualizes
what else he can have stemming from this. He usually
can't visualize more than one step at a time ( ;-) ).
[/tt]
These are but a few 'standardisation' ideas (some already added), but I know that I have a lot more, and I will no-doubt add other posts. I know that the majority of you will also have a lot more.
MS should already have compiled such a list - depending on whether user or developer, but it hasn't and that's why the thread owner (JPeters) started this thread.
I think that you will all feel that this 'list' of 'standardized' Access development techniques/tips is not at all efficient or even that helpful. It could take hours to read each and every entry (some advice opposing other advice).
I feel that a website could easily be produced where entries could be vetted, voted on and introduced in categories - standardized Access development tips by category.
If anyone is interested, then please let me know.
If Tek-Tips can see a way of doing this within the Tek-Tips site - (a Tek-Tips/MS Access/ sub-site) even better.
Kind Regards,
Darrylle "Never argue with an idiot, he'll bring you down to his level - then beat you with experience." darrylles@totalise.co.uk