Results 1 to 6 of 6
  1. #1
    DigitalAdrenaline is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Dec 2012
    Posts
    100

    A Good Source for Naming Conventions

    Hi Guys, I'm just naming all my form elements in the Property Sheet and I'm appearing to double-up my names within text, label, combo boxes etc.

    All seems ok. I WAS confusing myself IN giving Text Boxes and Label Names the same tag, so I just deleted all label names from my text Boxes.

  2. #2
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,529

  3. #3
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,458
    Not sure what your question is or the point you are trying to make but my convention is to precede all control names with a 2 or 3 letter abbreviation for the control type e.g. txt.., cbo..., opt... etc although I tend to not bother with labels unless I am referencing them in code - in which case I use lbl…. I also do this before I start writing code - otherwise the renamed control will not find the associated code unless you manually relink it.

    I also don't use spaces or underscores in my naming conventions - including field and table names but do make use of the caption property for what I would call 'output queries' - i.e. queries that are final output as forms, reports or exported to excel etc to provide a more 'friendly' heading e.g. the caption for a field called custName might be Customer Name. OK you can change the caption in the associated label but if the same table/query is used in different forms/reports that is multiple places to change it - and the direct export or viewing of a query would still show the field name. Note I tend not to set the caption until the development is finished or close to - otherwise during development seeing the column heading as 'customer name' in query/form/report view but the field name in the query grid as custName can be a bit disorienting.

  4. #4
    DigitalAdrenaline is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Dec 2012
    Posts
    100
    Hi Ajax, sorry for that confusing post. I did come back to delete it after solving my naming issue but couldn't see any delete option, so I instead just erased the body of my post. I had confused myself in prefixing my Text/Combo Box Name and Label Name fields with both lbl.. causing me to double-up my user naming. So, I simply deleted all text from the Label Name field for my Text boxes to be empty, and just populated the Name field with txt... and cb... etc. Hope that makes sense. Screenshot below. BTW, your explanation above is excellent. Well communicated.

    Click image for larger version. 

Name:	Names.jpg 
Views:	10 
Size:	36.2 KB 
ID:	34800

  5. #5
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,746

  6. #6
    DigitalAdrenaline is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Dec 2012
    Posts
    100
    Thanks Orange, that's a good cheat-sheet. Cheers.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. conventions in naming and using of macros
    By ntambomvu in forum Programming
    Replies: 5
    Last Post: 11-29-2016, 03:22 PM
  2. Naming standards or conventions
    By Jennifer Murphy in forum Access
    Replies: 10
    Last Post: 02-01-2014, 08:04 PM
  3. Replies: 5
    Last Post: 05-08-2013, 05:36 PM
  4. Setting Naming Conventions for IDs
    By LukeJ Innov in forum Access
    Replies: 1
    Last Post: 04-25-2013, 06:27 AM
  5. Naming conventions
    By Yesideez in forum Database Design
    Replies: 3
    Last Post: 06-29-2011, 08:55 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums