Standards and conventions!

dewsbury

Registered User.
Local time
Today, 07:32
Joined
Jul 4, 2008
Messages
57
A general query rather than a specific one.

Are there any naming conventions for forms, tables etc?

Are there any standards for any or all access bits?

I have noticed databases where the forms were prefixed with "Frm" altho' I was unsure of the merits of this??
 
I think David's link is good. Here are some extra conventions that I have used myself (some are my inventions, some are not):

cbo = combo box
lbl = label
lst = listbox
txt = text box
tbl = table
frm = form
subfrm = subform
bas = VB module
mcr = macro
qry = query
rpt = report
cmd = button
img = image control

Just my 2 cents worth.
 
I've said it before and I'll say it again.

Any naming convention that isn't "natural" to you is useless. Because you'll forget to use it or avoid using it. Or use it inconsistently.

Any convention that you will use is good. As long as you follow it. As long as you CAN follow it.

The most beautiful theoretically-based naming convention in the world is a steaming pile of dyspeptic dragon droppings if you can't use it effectively.

(OK, I'll admit it - I'm a pragmatist.)
 
You mentioned the merits of these prefixes, Here's an opinion from a student in programming..

I recently got a summer student job. I got plopped into an office of busy programmers with little time for explaining previous code (behind the scenes functionality) to me. My first job was to take a database currently in existance and make it better... add things and optimize previous code (less lines or more efficient is what they wanted)

When reading through code you yourself have not written (at least for me) it is sometimes nearly impossible to destinguish between controls and variables, and harder to destinguish between variable types. these prefixes Help with that, ALOT!

the guys here prefix controls / variable with an abreviation of the type of control / variable. So, text boxes get txt in front standing for 'text' Which ud think "textbox" or lst for list, or listbox, and lbl for label, or str for string or int for integer, dbl for dbl, you get the picture. same goes for frm for form, qry for query, tbl for table, etc. in code I then knew right away "Oh, he's refering to a form, or a query, or a table".

This way when scrolling thru code and optimizing it or changing, i didnt have to find where things were used or initialized to know what kind of variable they were. AND! especially for controls, when i saw txtName i knew it was the name textbox, and lblName was the label for the name textbox. I didnt have to decipher which was which like i would if they used name1, name2 or something like that.

If you yourself arent a programmer and more a user, you maybe wouldnt see the values of this, but trust me programmers will thank you, and if you are a programmer, you'll thank yourself or others later for it.

Hope this helps understand the value of the prefixes
 
Last edited:
you mentioned the merits of these prefixes, here's an opinion from a student in programming..

I recently got a summer student job. I got plopped into an office of busy programmers with little time for explaining previous code to me. My first job was to take a database currently in existance and make it better... Add things and optimize previous code (less lines or more efficient is what they wanted)

when reading through code you yourself have not written (at least for me) it is sometimes nearly impossible to destinguish between controls and variables, and harder to destinguish between variable types. These prefixes help with that, alot!

The guys here prefix controls / variable with an abreviation of the type of control / variable. So, text boxes get txt in front standing for 'text' which ud think "textbox" or lst for list, or listbox, and lbl for label, or str for string or int for integer, dbl for dbl, you get the picture.

This way when scrolling thru code and optimizing it or changing, i didnt have to find where things were used or initialized to know what kind of variable they were. And! Especially for controls, when i saw txtname i knew it was the name textbox, and lblname was the label for the name textbox. I didnt have to decipher which was which like i would if they used name1, name2 or something like that. Hope that helps understand the logic behind it abit

exactly!!!
 

Users who are viewing this thread

Back
Top Bottom