Tuesday, March 27, 2012

Naming Conventions


Database Object Naming Conventions
The Leszynski/Reddick Guidelines for Microsoft Access is the most commonly used naming convention for Access objects. These Guidelines as published in SmartAccess, suggest that all objects should have a descriptive tag, placed at the start of the object name.
Note: It is suggested that the choice of naming convention is not as important as making sure that you do implement 'A' naming stragegy. Which one is purely a personal preference.

Tags for Defining Data Types

Data Type
Tag
Binary
bin
Byte
byt
Autonumber
lng
Currency
cur
Date/Time
dtm
Double
dbl
Integer
int
Long
lng
Memo
mem
Ole
ole
Single
sng
Text
str
Yes/No
ysn

Tags for Database Container Objects
Objects
Tag
Example
Form
frm
frmCustomer
Form (Dialog)
fdlg
fdlgLogin
Form (Menu)
fmnu
fmnuUtility
Form (Message)
fmsg
fmsgWait
Form (Subform)
fsub
fsubOrder
Macro
mcr
mcrUpdateInventory
Macro (Menu)
mmnu
mmunEntryFormFile
Module
bas
basBilling
Query (Append)
qapp
qappNewProduct
Query (Crosstab)
qxtb
qxtbRegionSales
Query (DDL)
qddl
qddlIInit
Query (Delete)
qdel
qdelOldAccount
Query (Form Filter)
qflt
qfltSalesToday
Query (Make-Table)
qmak
qmakShipTo
Query (Select)
qry/qsel
qryOverAchiever
Query (SQL Pass-Through)
qspt
qsptOrder
Query (Totals)
qtot
qtotResult
Query (Union)
quni
quniMerged
Query (Update)
qupd
qupdDiscount
Query (Lookup)
qlkp
qlkpStatus
Report
rpt
rptInsuranceValue
Report (Subreport)
rsub
rsubOrder
Table
tbl
tblCustomer
Table (Lookup)
tlkp
tlkpShipper

Tags For Control Objects
Object
Tag
Example
Chart
cht
chtSales
Check Box
chk
chkReadOnly
Combo Box
cbo
cboIndustry
Command Button
cmd
cmdCancel
Frame
fra
fraPhoto
Label
lbl
lblHelpMessage
Line
lin
linVertical
ListBox
lst
lstPolicyCode
Option Button
opt
optFrench
Option Group
grp
grpLanguage
Page Break
brk
brkPage1
Rectangle (Shape)
shp
shpNamePanel
Subform/Report
sub
subContact
Textbox
txt
txtLoginName
Toggle Button
tgl
tglForm


Alternatives to the Leszynski naming convention can be found in: Naming Conventions - Hungarian Notation

No comments:

Post a Comment