Joe Rojas
JRojas at tnco-inc.com
Mon May 16 15:10:48 CDT 2005
I'm here! I not scared! I understand the whole issue about avoiding using global when we only need procedural. I was only confused why I couldn't find a definition of Global in the help file. Thanks for all the great feedback! Thanks, Joe Rojas IT Manager TNCO, Inc. 781-447-6661 x7506 jrojas at tnco-inc.com -----Original Message----- From: John W. Colby [mailto:jwcolby at colbyconsulting.com] Sent: Monday, May 16, 2005 3:37 PM To: 'Access Developers discussion and problem solving' Subject: RE: [AccessD] Global Variable ROFTL. Am I going to be charged in his unfortunate demise? John W. Colby www.ColbyConsulting.com Contribute your unused CPU cycles to a good cause: http://folding.stanford.edu/ -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Dan Waters Sent: Monday, May 16, 2005 3:30 PM To: 'Access Developers discussion and problem solving' Subject: RE: [AccessD] Global Variable Joe! Joe - are you there? C'mon Joe - are you OK? Joe! Joe? Uh Oh . . . Dan Waters -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Monday, May 16, 2005 1:17 PM To: accessd at databaseadvisors.com Subject: RE: [AccessD] Global Variable Hi Charlotte and John But Joe asked about one (1) global. No reason to scare the life of him. /gustav >>> cfoust at infostatsystems.com 05/16 6:58 pm >>> Now, Gustav, you know there are no guarantees for "nice" code, regardless. It's just easier to write bad code if you lard it with globals, which is why it is frowned upon by so many of us who prefer to avoid shooting ourselves in the foot. Charlotte Foust -----Original Message----- From: Gustav Brock [mailto:Gustav at cactus.dk] Sent: Monday, May 16, 2005 9:34 AM To: accessd at databaseadvisors.com Subject: RE: [AccessD] Global Variable Hi John You may like or prefer or need, or not, a global variable - that's up to everyone to decide for him/herself - but they are not "bad practice", not even in general. You may write clumsy code using globals, but not using them gives no guarantee for nice code. /gustav >>> jwcolby at colbyconsulting.com 05/16 5:00 pm >>> To dimension a global variable just go to the header of any module and type in Global MyVar as SomeVarType That's all there is to it, you can now reference the variable from any code in the project. Don't get carried away with them, they are considered bad practice in general. John W. Colby www.ColbyConsulting.com Contribute your unused CPU cycles to a good cause: http://folding.stanford.edu/ -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Joe Rojas Sent: Monday, May 16, 2005 10:54 AM To: 'Access Developers discussion and problem solving' Subject: [AccessD] Global Variable Hi All, I am using a code example, from Microsoft, that allows me to print a constant number of lines on a report. The code example uses a variable that is defined as Global. "Global TotCount As Integer" What's the deal with Global? I can't find it defined anywhere. TIA! JR -- 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 -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com This electronic transmission is strictly confidential to TNCO, Inc. and intended solely for the addressee. It may contain information which is covered by legal, professional, or other privileges. If you are not the intended addressee, or someone authorized by the intended addressee to receive transmissions on behalf of the addressee, you must not retain, disclose in any form, copy, or take any action in reliance on this transmission. If you have received this transmission in error, please notify the sender as soon as possible and destroy this message. While TNCO, Inc. uses virus protection, the recipient should check this email and any attachments for the presence of viruses. TNCO, Inc. accepts no liability for any damage caused by any virus transmitted by this email.