|
To make managing objects easier, it is important to use a naming convention.
While not required by Microsoft Access, a naming convention will
make your work easier to understand and easier to share.
Probably the most popular naming convention among Access designers
is the Leszynski Naming Convention, also known as the LNC. The LNC, like most
database naming conventions, makes use of tags.
These tags are usually three letters that precede (and are part
of) names of entities in a database, including objects and fields.
In all honesty, it really doesn't matter which naming convention
you choose, as long as you do pick one and stick to it! At the very
minimum, use a convention for the names of objects (tables, queries,
forms, reports, and macros) in your database.
In an employees database, it is likely you would need a table
about employees, and a query about employees, and a form for employees, and a
report... you get the idea.
A naming convention will allow you to know the type of object just
by looking at the name, tblEmployees, qryEmployees, frmEmployees, rptEmployees,
etc. If programming is ever done in the database, it will be unnecessarily
complicated if a naming convention is not used.
Naming conventions also make your work look more professional.
The tags are always lowercase and the rest of the name begins with
an uppercase letter. Object names and field names are "camel backed", meaning
there are no spaces, and each word begins with an uppercase letter.
Object names should:
-
Begin with the appropriate tag
-
Be "camel-backed"
-
Contain only letters or numbers (no spaces, special characters,
punctuation, or underscores)
Avoid using the following characters:
,.~!@#$%^&*()+-=|\:;'<>?/"`[]{}
in any name in a database!
And the LNC tags are...
Objects:
| Table |
tbl |
| Query |
qry |
| Form |
frm |
| Report |
rpt |
| Macro |
mcr |
| Module |
bas or mdl or mod |
Fields:
| Binary |
bin |
| Byte |
byt |
| Currency |
cur |
| Date/Time |
dtm |
| Double |
dbl |
| Integer |
int |
| Long Integer |
lng |
| Memo |
mem |
| OLE |
ole |
| Single |
sng |
| Text |
str |
| Yes/No |
ysn |
Controls:
| Label |
lbl |
| Text Box |
txt |
| Option Group |
opt |
| Toggle Button |
tgb |
| Option Button |
opb |
| Combo Box |
cbo |
| List Box |
lst |
| Command Button |
cmd |
|
| Image |
img |
| Tab Control |
tab |
| Unbound Object Frame |
uof |
| Bound Object Frame |
bof |
| Subform |
sbf |
| Subreport |
sbr |
| Line |
lin |
| Rectangle |
rct |
|
Again, it isn't at all important which
naming convention you use. But it is important that you use one.
|
|