If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Object Naming Conventions
Do underscores in object names cause any issues? Such as Daily_Report? Any
tips on object naming conventions that seem to work best? Thanks in advance. |
#2
|
|||
|
|||
Object Naming Conventions
On Mon, 02 Feb 2009 18:29:01 -0800, Brian Carlson wrote:
Do underscores in object names cause any issues? Such as Daily_Report? Any tips on object naming conventions that seem to work best? Thanks in advance. Underscores are fine. I prefer Camel-Case as in "DailyReport" myself, but underscores are better than spaces or dashes. -- Rick Brandt, Microsoft Access MVP Email (as appropriate) to... RBrandt at Hunter dot com |
#3
|
|||
|
|||
Object Naming Conventions
Underscores are fine for objects in Access.
(You may want to avoid them in class modules.) There are many styles of naming convention. A popular one uses 3-char prefixes: http://www.xoc.net/standards/rvbanc.asp#DAO Others use different systems, e.g.: http://www.granite.ab.ca/access/tablefieldnaming.htm http://www.granite.ab.ca/access/tony...onventions.htm Some factors to consider: - In some contexts, it can be hard to know whether a source is a table or query if you use no naming convention. - Use A-Z, 0-9, and underscore only, and don't use leading numbers. (This avoids several issues where you would have to type square brackets around names.) - Object names are not case sensitive, but camel case may make it easier to read. It's up to you whether DailyReport is faster to type than Daily_Report. - Consider what additional distinctions you want to make, e.g. a prefix to distinguish local tables (that exist in the front end) from attached tables (in the back end.) -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Brian Carlson" wrote in message ... Do underscores in object names cause any issues? Such as Daily_Report? Any tips on object naming conventions that seem to work best? Thanks in advance. |
#4
|
|||
|
|||
Object Naming Conventions
Thanks for the answer Rick. I am intending on using Camel-Case, but I would
like to make the names as clear as possible such as: table_DailyReport or tbl_DailyReport, but want to ensure that my naming conventions do not cause me any issues in the future in case I learn enough to expand my database. "Rick Brandt" wrote: On Mon, 02 Feb 2009 18:29:01 -0800, Brian Carlson wrote: Do underscores in object names cause any issues? Such as Daily_Report? Any tips on object naming conventions that seem to work best? Thanks in advance. Underscores are fine. I prefer Camel-Case as in "DailyReport" myself, but underscores are better than spaces or dashes. -- Rick Brandt, Microsoft Access MVP Email (as appropriate) to... RBrandt at Hunter dot com |
#5
|
|||
|
|||
Object Naming Conventions
On Mon, 02 Feb 2009 19:17:02 -0800, Brian Carlson wrote:
Thanks for the answer Rick. I am intending on using Camel-Case, but I would like to make the names as clear as possible such as: table_DailyReport or tbl_DailyReport, but want to ensure that my naming conventions do not cause me any issues in the future in case I learn enough to expand my database. I'm not a fan of object-type-prefixing, but many do use it. Bottom line is if it makes sense to you, then use whatever convention you like. Consistency is a best practice, but there are no naming convention police that will come knocking on your door. As for "causing problems" that is pretty much limited to avoiding certain characters. I never use anything besides A-Z, 0-9, and the underscore. While Access and SQL Server allow "sloppy" naming you never know when you might end up working with another engine or tools that are more strict. -- Rick Brandt, Microsoft Access MVP Email (as appropriate) to... RBrandt at Hunter dot com |
#6
|
|||
|
|||
Object Naming Conventions
While Access and SQL Server allow "sloppy" naming you never know when you
might end up working with another engine or tools that are more strict. Rick, Just an observation I made, Access 2007 is a little more intolerant then it's predecessors when it come to "sloppy" naming. -- Gina Whipp "I feel I have been denied critical, need to know, information!" - Tremors II http://www.regina-whipp.com/index_files/TipList.htm "Rick Brandt" wrote in message ... On Mon, 02 Feb 2009 19:17:02 -0800, Brian Carlson wrote: Thanks for the answer Rick. I am intending on using Camel-Case, but I would like to make the names as clear as possible such as: table_DailyReport or tbl_DailyReport, but want to ensure that my naming conventions do not cause me any issues in the future in case I learn enough to expand my database. I'm not a fan of object-type-prefixing, but many do use it. Bottom line is if it makes sense to you, then use whatever convention you like. Consistency is a best practice, but there are no naming convention police that will come knocking on your door. As for "causing problems" that is pretty much limited to avoiding certain characters. I never use anything besides A-Z, 0-9, and the underscore. While Access and SQL Server allow "sloppy" naming you never know when you might end up working with another engine or tools that are more strict. -- Rick Brandt, Microsoft Access MVP Email (as appropriate) to... RBrandt at Hunter dot com |
Thread Tools | |
Display Modes | |
|
|