Naming: Subform Control vs Subform Itself

C

croy

What's the best rule of thumb for naming subform controls?
It is better to name them differently from the subform name?
 
D

Douglas J. Steele

I always name the forms being used as subforms sfrmXXXX, and the control
subXXXX, but there's no real reason for that. Whatever you find most
convenient.


Remember, though, that sometimes you have no choice. Don't forget that it's
possible to use the same form multiple times as a subform on the same parent
form.
 
C

croy

I always name the forms being used as subforms sfrmXXXX, and the control
subXXXX, but there's no real reason for that. Whatever you find most
convenient.


Remember, though, that sometimes you have no choice. Don't forget that it's
possible to use the same form multiple times as a subform on the same parent
form.


Good point. Thanks.
 
B

boblarson

I'm going to chime in here too. I personally like to keep my subform
container name the same as my subform name just for the ease of use, but I
also know the differences for referring to each of them, so I know when I
want to use certain things related to the control and when I want to refer to
the form itself.

I've a little "Quick Tutorial" that might also help anyone who wants to
learn more about the subject. I put together, what I've found to be, an easy
way to remember the differences.

It's here:

http://www.btabdevelopment.com/main/LinkClick.aspx?link=76&tabid=55&mid=385
 
Top