T
Tony Toews [MVP]
André Minhorst said:As we are discussing about Access 2007 features I would like to tell you
a reason why to use prefixes for Access objects: In contrast to the
database window the navigation pane allows you to open any object
without using the mouse. You just click F11 to active or show the
navigation pane, click Strg + f, then type a part of the object's name.
So if you are looking for a table, you just type "tbl" and all tables
will appear. Scroll through the tables until you find the requested one
and click on enter to open it. That won't work without any prefixes. ;-)
When I'm in Access 97 - A2003 when in the database container window I
can hit the first letter of the object name, for example P for
PurchaseOrders. And I'm there. No need to scroll. No need to use
the mouse.
Another reason to follow this standard is that it might be easier for
other developers to read and understand your databases and the objects
and code inside. But I'm sure you already know that. ;-)
Sure, but to me that's a fairly minuscule reason. And the advantages
of not using tbl, qry, frm and rpt far outweigh any reasons to use
them.
In this article you write:
"But still this isn't too bad. This would still be manageable. The
real pain point is the various query, form and report wizards. Where
you can only see 8 or 12 objects. The above database has 1200 queries,
450 forms and 350 reports. See the below screen."
If I had a database with so much objects, I would just drag the objects
(tables/queries) from the database window into the query instead of
using the wizards' dialogs.
And I do that a lot as well. But I still need to scroll around to
those objects. So hitting P for PurchaseOrders is very handy.
However that's about the only situation where you can do that. There
are many wizards where all you are presented with is a list of objects
and you have to scroll, scroll, scroll.
In "Tony's Table and Field Naming Conventions" you say:
"All field names are prefixed with the initials of the table name, e.g.
cName, ihInvoiceNbr and dQuantity"
That sounds somehow like redundant information. We don't give our first
names the initial of our last names, do we? Altough "mAndré" and "tTony"
looks funny somehow ... ;-)
When looking at a complex report you can tell at a glance what table
that field came from.
What when you have tables with the same initial?
You figure something out. Just like that page stated.
What if you have to change a table name after creating it or to add a
customer table from one database to another one that already contains a
table named categories? Seems to be a lot of work ... even if other
objects and code already refer to this object.
So I'd import the table and objects into a temporary database, do my
renaming likely be ensuring autocorrect is on and then import into the
final database.
Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/