Agee Software, Inc.
Access Naming Conventions
One of the easiest ways to keep development costs low is to use standard naming conventions for all objects in your database. This keeps you from having to look up the name property of each object before referring to it. It also lets you copy objects used in a previously developed application and globally replace names more easily. A table should be named for the data it contains. For example, the table that contains info about customers should be named tblCustomer. Keep names short, singular and descriptive without abbreviating. Did you name that table Customer, Customers, Cust, Csts, MyCustomers or CustomerList? Avoid keywords, spaces and special characters.Keywords mean something different in Access. Avoid Name, Length, Size, Top, Left, Width, Form, First, Last, Row, Column, Value, etc.
If you use a space in an object, you must enclose it in [] brackets or quotes.
Special characters like % $ * & + # ! . ; ' " = ( ) [ ] { } / \ - and ^ mean something in VBA and should be avoided.
Avoid the underscore _ too. It is acceptable, but you must remember where it was used. Use TitleCase. It is easier to read rptMonthlySalesSummary than RPTMONTHLYSALESSUMMARY. Use prefixes so you can tell what type of object you are using. Otherwise tables and queries get confusing.
Object | Prefix |
Table | tbl |
Query | qry |
Form | frm |
Report | rpt |
Macro | mcr |
Module | mod |
Object | Prefix |
Label | lbl |
Textbox | txt |
Command Button | cmd |
Combo Box | cbo |
List Box | lst |
Line | ln |
Picture | pic |
Option Group | opt |
Checkbox | chk |
PageBreak | pg |
Subform | sfrm |
Object | obj |