---Soumis par Dev Ashish---
Convention de noms.
Convention commune de noms (Extrait de Rcurtis@princeton.edu's Access notes)
Le Leszynski/Reddick
Guidelines pour Access est la convention la plus utilisée pour nommer
les objets Access. Ces recommandations, publiées dans SmartAccess,
suggèrent que tous les objets doivent avoir un préfixe (tag) descriptif.
Note: Il est suggéré que le choix d'une convention n'est pas aussi importante
que le fait d'en utiliser une. Laquelle est utilisée est purement une question
de préférence.
Préfixes pour les objets de bases de données
Object | Préfixe | Exemple |
Form | frm | frmCustomer |
Form (Dialog) | fldg | 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 |
Autres préfixes pour "container"
Objets archivés | zz | zzfrmPhoneList |
Objets du système | zs | zstblObjects |
Objets temporaires | zt | ztqryTest |
En développement | _ _mcrnewEmployee |
Préfixes pour contrôles
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 |
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 selon l'étendue (scope)
Globale | g | glngGrandTotal |
Locale (aucun) | intCustomerld | |
Module | m | mcurRunningSum |
Passé comme paramètre | p | pstrLastName |
Static | s | sintAccumulate |