Commonly used naming conventions (Taken
from Rcurtis@princeton.edu's Access notes)
The Leszynski/Reddick
Guidelines for 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 Database Container Objects
Object |
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 |
qddIInit |
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 |
Database Container Object Prefixes
Archived objects |
zz |
zzfrmPhoneList |
System Objects |
zs |
zstblObjects |
Temporary objects |
zt |
ztqryTest |
Under development |
_ _mcrnewEmployee |
|
Tags for Control Objects
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 |
Tags for Access Basic / VBA Variables
Container |
con |
Dim conTables as Container |
Control |
ctl |
Dim ctlVapour As Control |
Currency |
cur |
Dim curSalary As Currency |
Database |
db |
Dim dbCurrent As Database |
Document |
doc |
Dim docRelationships as Document |
Double |
dbl |
Dim dblPi As Double |
Dynaset |
dyn |
Dim dynTransact As Dynaset |
Field |
fld |
Dim fldLastName as Field |
Flag (Y/N,T/F) |
f |
Dim fAbort As Integer |
Form |
frm |
Dim frmGetUser As Form |
Group |
gru |
Dim gruManagers as Group |
Index |
idx |
Dim idxOrderld as Index |
Integer |
int |
Dim intRetValue As Integer |
Long |
lng |
Dim lngParam As Long |
Object |
obj |
Dim objGraph As Object |
Parameter |
prm |
Dim prmBeginDate as Parameter |
Property |
prp |
Dim prpUserDefined as Property |
QueryDef |
qdf/qrd |
Dim qdfPrice As QueryDef |
Recordset |
rst/rec |
Dim rstPeople as Recordset |
Relation |
rel |
Dim relOrderItems as Relation |
Report |
rpt |
Dim rptYTDSales As Report |
Single |
sng |
Dim sngLoadFactor As Single |
Snapshot |
snp |
Dim snpParts As Snapshot |
String |
str |
Dim strUserName As String |
Table |
tbl |
Dim tblVendor As Table |
TableDef |
tdf/tbd |
Dim tdfBooking as TableDef |
Type (user-defined) |
typ |
Dim typPartRecord As mtPART_RECORD |
User |
usr |
Dim usrJoe as User |
Variant |
var |
Dim varInput As Variant |
Workspace |
wrk/wsp |
Dim wrkPimary as Workspace |
Yes/No |
ysn |
Dim ysnPaid As Integer |
Access Basic Variable / VBA Prefixes for Scope
Global |
g |
glngGrandTotal |
Local (none) |
|
intCustomerld |
Module |
m |
mcurRunningSum |
Passed parameter |
p |
pstrLastName |
Static |
s |
sintAccumulate |
|