Charlotte Foust
cfoust at infostatsystems.com
Fri Mar 3 10:06:49 CST 2006
For Each ctl in Me.Controls ... Charlotte -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of John Colby Sent: Thursday, March 02, 2006 8:21 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Table naming conventions >But you also use the dot operator to refer to members of a collection, >and the controls are members of the parent object's controls collection. I'm not following you on this one. Can you give an example? John W. Colby www.ColbyConsulting.com -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust Sent: Thursday, March 02, 2006 8:30 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Table naming conventions But you also use the dot operator to refer to members of a collection, and the controls are members of the parent object's controls collection. ;o> Charlotte Foust -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of John Colby Sent: Thursday, March 02, 2006 4:47 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Table naming conventions >Using Dot to refer to properties is known to cause weirdnesses. Ooops. Using Dot to refer to Objects can cause weirdnesses. Sorry for the confusion. I can think of at least one exception (kind of) however. To refer to a control on a subform, the syntax is me!SubformControl.Subform!Control. In this case I think that .Subform is a PROPERTY of the subformControl which returns a pointer to an object (the actual loaded subform). So even here Dot is the correct syntax. John W. Colby www.ColbyConsulting.com -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of John Colby Sent: Thursday, March 02, 2006 6:55 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Table naming conventions LOL, because it is the wrong syntax and can cause the vba interpreter to get confused and do stupid things. In the early days of Access, me.object was the accepted syntax. Sometime around A97 Microsoft switched to the ! As the "accepted" syntax. Dot is for properties, Bang is for objects. Using Dot to refer to properties is known to cause weirdnesses. John W. Colby www.ColbyConsulting.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com