jwcolby
jwcolby at colbyconsulting.com
Tue Jul 17 07:44:33 CDT 2007
Global conditional compilation only works if the conditional constant is at the database level. Any conditional constants defined in a module are only valid for that module. To set a global constant: 1) Open any database 2) Open any module 3) Tools / MyDatabaseName Properties 4) Set the conditional compilation arguments text box there Conditional compilation arguments are NOT regular constants or variables. They have to be declared with a #const keyword: #const gbooConditionalCompilation = True Even then, this is only valid in the module in which it is declared. The only way to get a GLOBAL variable is the process discussed above. John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Sad Der Sent: Tuesday, July 17, 2007 2:52 AM To: Acces User Group Subject: [AccessD] Conditional Compilation ADP 2002? Hi, I want to use conditional compilation in a project. If i'm debugging the code some parts are not allowed to run. But it doesn't seem to work... I created a Mod with a public var: Public gbooConditionalCompilation As Boolean In my form I have the following code: #If gbooConditionalCompilation Then MsgBox "We are debugging this sht" #End If before I come to this point I set (in immediate window) the global boolean to true: gbooConditionalCompilation = True I think i'm making a massive error somewhere...any thoughts? Thnx ____________________________________________________________________________ ________ Fussy? Opinionated? Impossible to please? Perfect. Join Yahoo!'s user panel and lay it on us. http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com