jwcolby
jwcolby at colbyconsulting.com
Thu Nov 12 10:49:28 CST 2009
You know I read that somewhere, long ago. Thanks for reminding us. John W. Colby www.ColbyConsulting.com Jim Dettman wrote: > <<The correct syntax for Access is to reference controls with a ! and a > property with a .>> > > That's old style syntax (which I still use as well). A . (dot) works > fine and in fact is faster then the ! (bang) syntax. > > This changed starting with Access 2000 (might be wrong on that) when the > controls collection was made the default collection for forms and reports. > > Jim. > > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: Thursday, November 12, 2009 11:01 AM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Several Questions regarding versions > > Arthur, > > > I've never seen a line of code that begins with an exclamation point > before. > > The ! is used because you are referencing a CONTROL on a form, not a > PROPERTY of an object. > > > With Forms(m_sFormName) > > referencing a FORM m_sFormName > > > !sfcWizPanel.SourceObject = ... > > referencing a CONTROL (scfWizPanel > > then a property of that CONTROL .SourceObject > > The correct syntax for Access is to reference controls with a ! and a > property with a . > > The compiler will try to fix any mistakes you make in doing this but you > really should use the > correct syntax. > > John W. Colby > www.ColbyConsulting.com > > > Arthur Fuller wrote: >> Questions for AccessD >> >> 1. What changed from version 2002 to 2003? I've been using 2003 for so > long >> that I can't remember 2002. As I recall it was buggy so they hurried out a >> fix that was called 2003. Can anyone confirm or deny? What's in 2003 that > is >> not in 2002? (The reason for this question is that I'm up for an interview >> for a contract and the client specified 2002 experience. I can't think of > a >> single person that uses 2002.) >> 2. Are there any tutorials available for how to customize the 2007 ribbon? > I >> think it's been asked and answered but I forget the answer. Has anyone > found >> a way to programmatically turn off the ribbon? >> 3. Perusing some interesting Access 2007 code for a wizard builder, I came >> across the following syntax: >> With Forms(m_sFormName) >> !sfcWizPanel.SourceObject = arrPanels(m_nCurrentPanel - > 1).sSubForm >> 'and more similar statements >> I've never seen a line of code that begins with an exclamation point > before. >> It appears to be no different than a dot. Is it used because of the >> subsequent dot notation on the remainder of the line? >> 4. All the 2007 samples are written with macros not code. But when in > Design >> mode on a form, on the Database Tools ribbon tab there is a command to > turn >> all the macros on a form into VBA code. It works like a charm, so I've >> converted all the samples to VBA code. My question: was this ability > always >> there (i.e. in 2003) and I simply didn't ever notice it, or is it new to >> 2007? >> >> Thanks in advance. >> Arthur