{"id":911,"date":"2014-03-15T16:45:54","date_gmt":"2014-03-15T20:45:54","guid":{"rendered":"http:\/\/regina-whipp.com\/blog\/?p=911"},"modified":"2016-07-08T23:02:45","modified_gmt":"2016-07-09T03:02:45","slug":"compile-on-demand-check-on-uncheck","status":"publish","type":"post","link":"https:\/\/regina-whipp.com\/blog\/?p=911","title":{"rendered":"Compile on Demand check or uncheck?"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-916 size-full\" src=\"http:\/\/regina-whipp.com\/blog\/wp-content\/uploads\/2014\/03\/CompileOnDemand.jpg\" alt=\"CompileOnDemand\" width=\"418\" height=\"354\" srcset=\"https:\/\/regina-whipp.com\/blog\/wp-content\/uploads\/2014\/03\/CompileOnDemand.jpg 418w, https:\/\/regina-whipp.com\/blog\/wp-content\/uploads\/2014\/03\/CompileOnDemand-300x254.jpg 300w, https:\/\/regina-whipp.com\/blog\/wp-content\/uploads\/2014\/03\/CompileOnDemand-150x127.jpg 150w, https:\/\/regina-whipp.com\/blog\/wp-content\/uploads\/2014\/03\/CompileOnDemand-400x338.jpg 400w\" sizes=\"auto, (max-width: 418px) 100vw, 418px\" \/><\/p>\n<p>Recently, while trying to Debug some code a colleague of mine suggested I leave <b>Compile on Demand<sup>1 <\/sup><\/b>unchecked.\u00a0 Since in all my years of developing I have always left it checked, I asked why and here&#8217;s what\u00a0he said\u00a0got&#8230;<\/p>\n<blockquote><p>Many years ago, Michael Kaplan mentioned that this setting was known to cause problems, at a Pacific NW Access Developer&#8217;s Group meeting.<\/p>\n<p>Here is how having this Option checked can bite you in the patooka&#8217;s!\u00a0 Suppose you have unfinished code, or some other compile error, in code that you are not currently using. You forget to do a final <strong>Debug<\/strong> &gt; <strong>Compile<\/strong>, to force all code to Compile. You deliver your app. to your customer. They immediately get a Run-Time error, with the same unused code. Why?\u00a0 Because this setting does not &#8220;travel&#8221; with your database; it is a global VBA environment setting. With this Option unchecked, ALL code must be compilable before any code can be run. Checking this option (the stupid default setting), allows for partial compliable; in other words, only the Modules that have code that you are running must be compilable. You could still have that experimental new module with code that does not Compile. Personally, I&#8217;d rather find these issues myself, instead of having a customer find them.\u00a0 &lt;smile&gt;<\/p><\/blockquote>\n<p>Additional comments here&#8230;\u00a0 <a href=\"https:\/\/groups.google.com\/forum\/#!topic\/comp.databases.ms-access\/zNaa_E271Rc\" target=\"_blank\">Say it aint&#8217;s so, Joe.<\/a><\/p>\n<p>Now, with that being said, I am still leaving mine checked (and I am not alone), not because I like to skirt danger but because I Compile my code if I just look at it.\u00a0 (Though nothing to do if you make no change, I check anyway.)\u00a0 So, the choice is up to up but I would heed the advice if you are not *religious* about Compiling your code!<\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_911\" class=\"pvc_stats all  \" data-element-id=\"911\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/regina-whipp.com\/blog\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"excerpt":{"rendered":"<\/p>\n<p>Recently, while trying to Debug some code a colleague of mine suggested I leave Compile on Demand1 unchecked. Since in all my years of developing I have always left it checked, I asked why and here&#8217;s what he said got&#8230;<\/p>\n<p>Many years ago, Michael Kaplan mentioned that this setting was known to cause problems, [&#8230;]<\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_911\" class=\"pvc_stats all  \" data-element-id=\"911\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/regina-whipp.com\/blog\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[18,21],"class_list":["post-911","post","type-post","status-publish","format-standard","hentry","category-access-tips","tag-database-design","tag-vba","odd"],"a3_pvc":{"activated":true,"total_views":1604,"today_views":0},"_links":{"self":[{"href":"https:\/\/regina-whipp.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/911","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/regina-whipp.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/regina-whipp.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/regina-whipp.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/regina-whipp.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=911"}],"version-history":[{"count":12,"href":"https:\/\/regina-whipp.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/911\/revisions"}],"predecessor-version":[{"id":1287,"href":"https:\/\/regina-whipp.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/911\/revisions\/1287"}],"wp:attachment":[{"href":"https:\/\/regina-whipp.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=911"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/regina-whipp.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=911"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/regina-whipp.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=911"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}