Control Type and Data Type Abbreviations

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bullfrog83
    New Member
    • Apr 2010
    • 124

    Control Type and Data Type Abbreviations

    This might be a dumb question but what is the abbreviation for a subform control? For example, when naming controls you use txt for a textbox, cbo for combobox, lst for listbox, etc. Is there one for subform and if so what? Better yet, is there a reference list somewhere that provides this information? Also, is there one for vba? For example, str = string, lng = long, var = variant, etc. Just want to do things properly!
  • TheSmileyCoder
    Recognized Expert Moderator Top Contributor
    • Dec 2009
    • 2322

    #2
    I suppose you could look at this:
    Microsoft Naming Conventions for Visual Basic

    Myself I don't use those, allthough maybe I should. I started using my own naming convetions, and now its at the point where it seems to cumbersome to switch to Microsofts.
    I use: cmb_ for combobox, tb_ for textbox, subFrm_ for subforms, tv_ for treeviews.

    For variables I use str, lng, db, allthough I can see where db (double) might get mixed up with db (database).

    I think the most important thing is to be as consistent within your own project as possible, and NEVER EVER make code using textbox4564.

    Comment

    • bullfrog83
      New Member
      • Apr 2010
      • 124

      #3
      Thanks! This is exactly what I was looking for.

      For double I've always used dbl so that it wouldn't get confused with db. But I don't normally declare my database in code. I always use CurrentDb. I wonder now if that's a good thing or not?

      Comment

      • TheSmileyCoder
        Recognized Expert Moderator Top Contributor
        • Dec 2009
        • 2322

        #4
        Originally posted by bullfrog83
        Thanks! This is exactly what I was looking for.

        For double I've always used dbl so that it wouldn't get confused with db. But I don't normally declare my database in code. I always use CurrentDb. I wonder now if that's a good thing or not?
        I should probably start using dbl for double, it does make more sense, even though, like you I never declare my database in code. I have seen it being done often, but it seems like a waste of time/lines of code to do it that way, when there is the option to just type CurrentDb, which is what I always use. I dont know if anyone works with alot of databases at the same time from the same code, but I dont :)

        Comment

        Working...