<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.office.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Power Tip: Maximize the use of TempVars in Access 2007 and 2010</title><link>http://blogs.office.com/b/microsoft-access/archive/2010/09/27/power-tip-maximize-the-user-of-tempvars-in-access-2007-and-2010.aspx</link><description>Today&amp;rsquo;s tip is provided by Juan Soto, Senior Access Developer at AccessExperts.net . His blog is at AccessExperts.net/blog and you can subscribe to it by clicking here . Juan is a frequent speaker at Access user groups nationwide and was a participant</description><dc:language>en-US</dc:language><generator>Telligent Community 1.5.134.15456 (Build: 5.5.134.15456)</generator><item><title>re: Power Tip: Maximize the use of TempVars in Access 2007 and 2010</title><link>http://blogs.office.com/b/microsoft-access/archive/2010/09/27/power-tip-maximize-the-user-of-tempvars-in-access-2007-and-2010.aspx#14168</link><pubDate>Tue, 28 Sep 2010 14:09:50 GMT</pubDate><guid isPermaLink="false">53587256-c606-4c9b-bad4-97c86b12ce62:14168</guid><dc:creator>Access_Expert</dc:creator><description>&lt;p&gt;David You are correct, there is no built in type checking, it is therefore up to the developer to maintain consistency in the code and use monikers such as str for String, lng for Long, etc. I look forward to your feedback once you start using 2007 or 2010, there many other great features you will enjoy, not the least of wish is the tab interface, which is my favorite. Kind Regards,&lt;/p&gt;
&lt;p&gt;Juan ORIGINAL POST:&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve not done any A2007/A2010-specific programming yet, so have had no opportunity to try the TempVars collection, but my main concern is that you&amp;#39;re sacrificing strong data typing of variables. There are a whole host of ways besides global or module-level variables to store data in memory in a way that will survive a code reset, and retain the virtues of strong data typing. My main concern is that if all TempVars are variants, what&amp;#39;s to stop you from storing something of the wrong data type? I looked at the documentation on MSDN and could see nothing about that at all.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.office.com/aggbug.aspx?PostID=14168" width="1" height="1"&gt;</description></item><item><title>re: Power Tip: Maximize the use of TempVars in Access 2007 and 2010</title><link>http://blogs.office.com/b/microsoft-access/archive/2010/09/27/power-tip-maximize-the-user-of-tempvars-in-access-2007-and-2010.aspx#14169</link><pubDate>Tue, 28 Sep 2010 05:58:58 GMT</pubDate><guid isPermaLink="false">53587256-c606-4c9b-bad4-97c86b12ce62:14169</guid><dc:creator>Garry Robinson</dc:creator><description>&lt;p&gt;From memory there is a maximum of 255 tempvars in a database. Tempvars are great in action queries TempVars!strAppName, especially ones that are used in exports (which fail when referencing form fields). Set them in code or a macro, plug them into the query and they magically turn up. Beats using functions for the same result.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.office.com/aggbug.aspx?PostID=14169" width="1" height="1"&gt;</description></item><item><title>re: Power Tip: Maximize the use of TempVars in Access 2007 and 2010</title><link>http://blogs.office.com/b/microsoft-access/archive/2010/09/27/power-tip-maximize-the-user-of-tempvars-in-access-2007-and-2010.aspx#14170</link><pubDate>Tue, 28 Sep 2010 00:19:28 GMT</pubDate><guid isPermaLink="false">53587256-c606-4c9b-bad4-97c86b12ce62:14170</guid><dc:creator>David W. Fenton</dc:creator><description>&lt;p&gt;I&amp;#39;ve not done any A2007/A2010-specific programming yet, so have had no opportunity to try the TempVars collection, but my main concern is that you&amp;#39;re sacrificing strong data typing of variables. There are a whole host of ways besides global or module-level variables to store data in memory in a way that will survive a code reset, and retain the virtues of strong data typing. My main concern is that if all TempVars are variants, what&amp;#39;s to stop you from storing something of the wrong data type? I looked at the documentation on MSDN and could see nothing about that at all.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.office.com/aggbug.aspx?PostID=14170" width="1" height="1"&gt;</description></item><item><title>re: Power Tip: Maximize the use of TempVars in Access 2007 and 2010</title><link>http://blogs.office.com/b/microsoft-access/archive/2010/09/27/power-tip-maximize-the-user-of-tempvars-in-access-2007-and-2010.aspx#14171</link><pubDate>Mon, 27 Sep 2010 17:41:43 GMT</pubDate><guid isPermaLink="false">53587256-c606-4c9b-bad4-97c86b12ce62:14171</guid><dc:creator>Albert D. Kallal</dc:creator><description>&lt;p&gt;Another long time workaround one can consider using a mde, or accDE. In a mde or accDE, then un-handled errors never re-set local or global vars. The other often not realized advantage of a mde/Accde is that un-handled errors don&amp;#39;t cause the runtime edition to stop, or shutdown. In fact, your program just keeps on running without a problem. So, in addition to TempVars, one can consider using a mde, or accDE as another means to give you bullet proof variables that don&amp;#39;t re-set on un-handled errors. This also means that class object variables also retain their values, and again do so regardless of errors occurring. However, in cases where you can&amp;#39;t or are not using a mde/accDE, then TempVars are great use case. And, your tip and point about being able to use TempVars in a query without a function is even more useful. In fact, I am going to adopt this practice in both accDE and accDB applications for the future. Thanks for sharing this with us. Albert D. Kallal (Access MVP) Edmonton, Alberta Canada&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.office.com/aggbug.aspx?PostID=14171" width="1" height="1"&gt;</description></item></channel></rss>