<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Bacon Bits: &#187; Integration</title>
	<atom:link href="http://datapigtechnologies.com/blog/index.php/tag/integration/feed/" rel="self" type="application/rss+xml" />
	<link>http://datapigtechnologies.com/blog</link>
	<description>A DataPig Technologies Blog</description>
	<lastBuildDate>Wed, 08 Sep 2010 12:25:25 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Running an Excel Macro from Access (or Another Excel Workbook)</title>
		<link>http://datapigtechnologies.com/blog/index.php/running-an-excel-macro-from-access-or-another-excel-workbook/</link>
		<comments>http://datapigtechnologies.com/blog/index.php/running-an-excel-macro-from-access-or-another-excel-workbook/#comments</comments>
		<pubDate>Tue, 31 Aug 2010 09:38:30 +0000</pubDate>
		<dc:creator>datapig</dc:creator>
				<category><![CDATA[Access VBA]]></category>
		<category><![CDATA[Excel & Access Integration]]></category>
		<category><![CDATA[Excel VBA]]></category>
		<category><![CDATA[Access]]></category>
		<category><![CDATA[Excel]]></category>
		<category><![CDATA[Integration]]></category>
		<category><![CDATA[Power Tips]]></category>
		<category><![CDATA[VBA]]></category>

		<guid isPermaLink="false">http://datapigtechnologies.com/blog/?p=2458</guid>
		<description><![CDATA[One of the more common questions I get revolves around running an Excel macro from Access. That is, how do you fire an existing Excel macro from Access.
I'll share the code to do that in a moment.
I first want to point out that this code can also come in handy if you need to run [...]]]></description>
			<content:encoded><![CDATA[<p>One of the more common questions I get revolves around running an Excel macro from Access. That is, how do you fire an existing Excel macro from Access.</p>
<p>I'll share the code to do that in a moment.</p>
<p>I first want to point out that this code can also come in handy if you need to run an external Excel macro in another workbook. That is to say, while you are working in an Excel file, you can reach out and run a macro in another workbook.<br />
<span id="more-2458"></span><br />
 </p>
<p>OK. Here it is. Simply paste this code in a new module.</p>
<p> </p>
<div class="syntax_hilite">
<div id="vb-2">
<div class="vb"><span style="color: #b1b100;">Sub</span> RunExcelMacro<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span><br />
<span style="color: #b1b100;">Dim</span> xl <span style="color: #b1b100;">As</span> Object</p>
<p><span style="color: #808080;">'Step 1:&nbsp; Start Excel, then open the target workbook.</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">Set</span> xl = <span style="color: #b1b100;">CreateObject</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #ff0000;">"Excel.Application"</span><span style="color:#006600; font-weight:bold;">&#41;</span><br />
&nbsp; &nbsp; xl.<span style="color: #66cc66;">Workbooks</span>.<span style="color: #b1b100;">Open</span> <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #ff0000;">"C:\Book1.xlsm"</span><span style="color:#006600; font-weight:bold;">&#41;</span></p>
<p><span style="color: #808080;">'Step 2:&nbsp; Make Excel visible</span><br />
&nbsp; &nbsp; xl.<span style="color: #66cc66;">Visible</span> = <span style="color: #b1b100;">True</span></p>
<p><span style="color: #808080;">'Step 3:&nbsp; Run the target macro</span><br />
&nbsp; &nbsp; xl.<span style="color: #66cc66;">Run</span> <span style="color: #ff0000;">"MyMacro"</span></p>
<p><span style="color: #808080;">'Step 4:&nbsp; Close and save the workbook, then close Excel</span><br />
&nbsp; &nbsp; xl.<span style="color: #66cc66;">ActiveWorkbook</span>.<span style="color: #b1b100;">Close</span> <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #b1b100;">True</span><span style="color:#006600; font-weight:bold;">&#41;</span><br />
&nbsp; &nbsp; xl.<span style="color: #66cc66;">Quit</span></p>
<p><span style="color: #808080;">'Step 5:&nbsp; Memory Clean up.</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">Set</span> xl = <span style="color: #b1b100;">Nothing</span></p>
<p><span style="color: #b1b100;">End</span> <span style="color: #b1b100;">Sub</span></div>
</div>
</div>
<p></p>
<p> </p>
<p>Some notes on the code:</p>
<p><strong>Step 1:</strong> Create a new instance of Excel, open the target workbook; the workbook that contains the macro you need to run.</p>
<p> </p>
<p><strong>Step 2:</strong> Making Excel Visible. By default, Excel will open and run in the background (invisible to you). You can set the Visible property to TRUE if you need to see the workbook. If you don't want to see the Excel workbook while the macro is running, simply set the Visible property to FALSE.</p>
<p> </p>
<p><strong>Step 3:</strong> Run the target macro</p>
<p> </p>
<p><strong>Step 4:</strong> Close and save the target workbook. The True argument in xlwkbk.Close(True) indicates that you want the workbook saved after the macro has run. If you do not want to save the target workbook, change this argument to False. Also in Step 4, you quit the Excel application, effectively closing the instance of Excel.</p>
<p> </p>
<p><strong>Step 5:</strong> Release the objects assigned to your variables, reducing the chance of any problems caused by rogue objects that may remain open in memory.</p>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://datapigtechnologies.com/blog/index.php/sending-variable-access-data-to-an-excel-range/" rel="bookmark" class="crp_title">Sending Variable Access Data To An Excel Range</a></li><li><a href="http://datapigtechnologies.com/blog/index.php/hack-into-a-protected-excel-2007-sheet/" rel="bookmark" class="crp_title">Hack into a protected Excel 2007 Sheet</a></li><li><a href="http://datapigtechnologies.com/blog/index.php/creating-a-zoom-box-in-excel/" rel="bookmark" class="crp_title">Creating a Zoom Box in Excel</a></li><li><a href="http://datapigtechnologies.com/blog/index.php/exploding-a-dataset-using-a-pivottable/" rel="bookmark" class="crp_title">Exploding a Dataset using a PivotTable</a></li><li><a href="http://datapigtechnologies.com/blog/index.php/using-access-to-combine-multiple-excel-files-method-2/" rel="bookmark" class="crp_title">Using Access to Combine Multiple Excel Files: Method 2</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://datapigtechnologies.com/blog/index.php/running-an-excel-macro-from-access-or-another-excel-workbook/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Converting Text to Proper Case in Access</title>
		<link>http://datapigtechnologies.com/blog/index.php/converting-text-to-proper-case-in-access/</link>
		<comments>http://datapigtechnologies.com/blog/index.php/converting-text-to-proper-case-in-access/#comments</comments>
		<pubDate>Mon, 16 Aug 2010 10:35:10 +0000</pubDate>
		<dc:creator>datapig</dc:creator>
				<category><![CDATA[Access Functions]]></category>
		<category><![CDATA[Access Queries]]></category>
		<category><![CDATA[Excel & Access Integration]]></category>
		<category><![CDATA[Access]]></category>
		<category><![CDATA[Integration]]></category>

		<guid isPermaLink="false">http://datapigtechnologies.com/blog/index.php/converting-text-to-proper-case-in-access/</guid>
		<description><![CDATA[Wendy writes to ask:
"In Excel, I can use the PROPER function to change my text to proper case. Why is there is no PROPER function in Access? "

Wendy has stumbled on one of the mysteries of life - there are many functions you use in Excel that are not found in Access. Well…it's not really [...]]]></description>
			<content:encoded><![CDATA[<p>Wendy writes to ask:</p>
<p><em>"In Excel, I can use the PROPER function to change my text to proper case. Why is there is no PROPER function in Access? "<br />
</em></p>
<p>Wendy has stumbled on one of the mysteries of life - there are many functions you use in Excel that are not found in Access. Well…it's not really a mystery. I actually have an idea why this may be.</p>
<p> <span id="more-2396"></span></p>
<p>The Access "Jet" engine was originally developed by the SQL Server team, outside the realm of Excel. So a majority of the Access functions you can use are closely related to those you can use in SQL Server. This inevitably meant that Excel and Access would use different functions to accomplish certain tasks. Converting text to upper, lower, and proper case falls into this category. <img src="http://datapigtechnologies.com/blog/wp-content/uploads/2010/08/081610_1035_ConvertingT1.png" alt="" /></p>
<p>So if Wendy wanted to convert her text to proper case in Access, she would need to use the STRCONV.</p>
<p> </p>
<p><span style="font-size:14pt"><strong>Using the StrConv function<br />
</strong></span></p>
<p>For those of you who have never used the StrConv function, it does need a bit of explaining. The StrConv function allows you to convert a string to a specified conversion setting such as uppercase, lowercase, or proper case. For example, StrConv("my text",3) would be converted to proper case, reading "My Text".</p>
<p> </p>
<p>Here is the basic syntax:<strong><em><br />
</em></strong></p>
<p><span style="font-size:12pt"><strong><em>StrConv(Target String, Conversion Type)<br />
</em></strong></span></p>
<p> </p>
<p>Target String is the string to be converted. In a query environment, you can use the name of a field to specify that you are converting all the row values of that field.</p>
<p>Conversion type specifies how to convert the string. The following constants identify the conversion type.</p>
<p>    1 - Converts the string to uppercase characters.</p>
<p>    2 - Converts the string to lowercase characters.</p>
<p>    3 - Converts the first letter of every word in string to uppercase.</p>
<p> </p>
<p>You would typically use the StrConv function in an update query.  This query would convert all the values in the Address field to proper case. </p>
<p><img src="http://datapigtechnologies.com/blog/wp-content/uploads/2010/08/081610_1035_ConvertingT2.png" alt="" /></p>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://datapigtechnologies.com/blog/index.php/find-and-replace-generally-sucks-in-access/" rel="bookmark" class="crp_title">Replacing Large Amounts of Data in Access</a></li><li><a href="http://datapigtechnologies.com/blog/index.php/why-find-when-you-can-search/" rel="bookmark" class="crp_title">Why FIND when you can SEARCH</a></li><li><a href="http://datapigtechnologies.com/blog/index.php/getting-week-number-in-access/" rel="bookmark" class="crp_title">Getting Week Numbers in Access</a></li><li><a href="http://datapigtechnologies.com/blog/index.php/transposing-a-dataset-in-access/" rel="bookmark" class="crp_title">Transposing a Dataset in Access</a></li><li><a href="http://datapigtechnologies.com/blog/index.php/creating-a-histogram-in-access/" rel="bookmark" class="crp_title">Creating a Histogram in Access</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://datapigtechnologies.com/blog/index.php/converting-text-to-proper-case-in-access/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Can’t Export More than 65,000 Rows to Excel 2007?</title>
		<link>http://datapigtechnologies.com/blog/index.php/cant-export-more-than-65000-rows-to-excel-2007/</link>
		<comments>http://datapigtechnologies.com/blog/index.php/cant-export-more-than-65000-rows-to-excel-2007/#comments</comments>
		<pubDate>Thu, 22 Apr 2010 11:37:29 +0000</pubDate>
		<dc:creator>datapig</dc:creator>
				<category><![CDATA[Access Tips and Tricks]]></category>
		<category><![CDATA[Excel & Access Integration]]></category>
		<category><![CDATA[Access]]></category>
		<category><![CDATA[Annoyances]]></category>
		<category><![CDATA[Excel]]></category>
		<category><![CDATA[Integration]]></category>
		<category><![CDATA[Tips and Tricks]]></category>

		<guid isPermaLink="false">http://datapigtechnologies.com/blog/?p=1930</guid>
		<description><![CDATA[Kusleika and I are at the Excel and Access Power User Workshop this week. Between you and me, he's not doing that well.
Anyway, one of our attendees asked why Access 2007 can't export more than 65,000 rows to Excel 2007. I replied with my usual professorial demeanor "What? You're on crack!"
This is when he demonstrated [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.dailydoseofexcel.com" target="_blank">Kusleika</a> and I are at the Excel and Access Power User Workshop this week. Between you and me, he's not doing that well.</p>
<p>Anyway, one of our attendees asked why Access 2007 can't export more than 65,000 rows to Excel 2007. I replied with my usual professorial demeanor "What? You're on crack!"</p>
<p>This is when he demonstrated these steps:</p>
<p><span id="more-1930"></span></p>
<ol>
<li><strong>Right click on the Table or Query<br />
</strong></li>
<li>
<div><strong>Click Export -&gt; Excel<br />
</strong></div>
<p> </p>
<p><img src="http://datapigtechnologies.com/blog/wp-content/uploads/2010/04/042210_1137_CantExportM1.png" alt="" /><strong><br />
</strong></p>
<p> </li>
<li><strong>Click the "Export data with formatting" option<br />
</strong></li>
<li><strong>Press OK<br />
</strong></li>
</ol>
<p><img src="http://datapigtechnologies.com/blog/wp-content/uploads/2010/04/042210_1137_CantExportM2.png" alt="" /></p>
<p> </p>
<p> </p>
<p>After a few gyrations, Access pops up this nasty-gram. Indeed, the table gets cut off at 65,000 lines.</p>
<p><img src="http://datapigtechnologies.com/blog/wp-content/uploads/2010/04/042210_1137_CantExportM3.png" alt="" /></p>
<p> </p>
<p> </p>
<p>Of course, being the expert I am, I immediately pointed out the issue.</p>
<p>The problem comes from the selection of "<strong>Export data with formatting" </strong>in Step 3.</p>
<p>If you uncheck this (leave it not checked), Access will export more than 65,000 rows just fine.</p>
<p><img src="http://datapigtechnologies.com/blog/wp-content/uploads/2010/04/042210_1137_CantExportM4.png" alt="" /></p>
<p> </p>
<p> </p>
<p>The reason for this isn't all that transparent, but it's pretty simple.</p>
<p>When the <strong>Export data with formatting </strong>option is checked, the windows clipboard is used. That is, Access will send the data to the Windows clipboard so that all the formatting and layout can be copied. The problem is that the old windows clipboard limits you to only 65,000 lines of data. Leaving this option unchecked allows access to simply transfer the data, bypassing the need for the windows clipboard. Problem solved.</p>
<p> </p>
<p>He was pretty happy with this answer - although, he still wants his money back.</p>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://datapigtechnologies.com/blog/index.php/avoiding-data-cut-off-in-excel/" rel="bookmark" class="crp_title">Avoiding Data Cut-Off in Excel</a></li><li><a href="http://datapigtechnologies.com/blog/index.php/using-access-to-combine-multiple-excel-files-method-2/" rel="bookmark" class="crp_title">Using Access to Combine Multiple Excel Files: Method 2</a></li><li><a href="http://datapigtechnologies.com/blog/index.php/sending-variable-access-data-to-an-excel-range/" rel="bookmark" class="crp_title">Sending Variable Access Data To An Excel Range</a></li><li><a href="http://datapigtechnologies.com/blog/index.php/the-trouble-with-chart-data-tables/" rel="bookmark" class="crp_title">The Trouble with Chart Data Tables</a></li><li><a href="http://datapigtechnologies.com/blog/index.php/the-big-grid-two-years-later/" rel="bookmark" class="crp_title">The Big Grid Two Years Later</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://datapigtechnologies.com/blog/index.php/cant-export-more-than-65000-rows-to-excel-2007/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The Case for Access</title>
		<link>http://datapigtechnologies.com/blog/index.php/the-case-for-access/</link>
		<comments>http://datapigtechnologies.com/blog/index.php/the-case-for-access/#comments</comments>
		<pubDate>Wed, 10 Mar 2010 05:57:31 +0000</pubDate>
		<dc:creator>datapig</dc:creator>
				<category><![CDATA[Excel & Access Integration]]></category>
		<category><![CDATA[~ Bacon Bits]]></category>
		<category><![CDATA[Access]]></category>
		<category><![CDATA[Excel]]></category>
		<category><![CDATA[Integration]]></category>
		<category><![CDATA[Misc]]></category>

		<guid isPermaLink="false">http://datapigtechnologies.com/blog/index.php/the-case-for-access/</guid>
		<description><![CDATA[Amazon says it's official. My new book will be out on April 5th.
This book is written for all you Excel users who know that expanding your skill-set to include Access can make you more productive. I guide you through analytical and reporting benefits of Access, and show you how you can integrate Excel and Access [...]]]></description>
			<content:encoded><![CDATA[<p>Amazon says it's official. My new book will be out on April 5<sup>th</sup>.</p>
<p>This book is written for all you Excel users who know that expanding your skill-set to include Access can make you more productive. I guide you through analytical and reporting benefits of Access, and show you how you can integrate Excel and Access to make your life easier.</p>
<p><a href="http://www.amazon.com/Excel-Analysts-Guide-Access/dp/0470567015/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1268198951&amp;sr=1-1" target="_blank"><img style="border: 0px;" src="http://datapigtechnologies.com/blog/wp-content/uploads/2010/03/031010_0557_TheCaseforA1.jpg" border="0" alt="" width="201" height="189" /></a></p>
<p> </p>
<p>To celebrate this new arrival, I've decided to post Chapter 1 of this book as today's blog entry. Enjoy!</p>
<p><span id="more-1803"></span></p>
<p><strong><em><span style="color:#632423">Excerpt from <a href="http://www.amazon.com/Excel-Analysts-Guide-Access/dp/0470567015/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1268199987&amp;sr=1-1" target="_blank"></a></span>Excel Analyst's Guide to Access<span style="color:#632423"> (ISBN: 0470567015).  Written by Mike Alexander; published by Wiley Publishing, Inc. Reprinted with permission from Wiley Publishing, Inc. - All rights reserved.</span></em><br />
</strong></p>
<p><span style="font-size:14pt"><strong><span style="color: #ffffff;">.</span></strong></span></p>
<p><span style="font-size:14pt"><strong>THE CASE FOR DATA ANALYSIS IN ACCESS<br />
</strong></span>     When you ask most people which software tool they use for their daily data analysis, the answer you most often get is Excel. Indeed, if you were to enter the key words data analysis in an Amazon.com search, you would get a plethora of books on how to analyze your data with Excel. Well if so many people seem to agree that using Excel to analyze data is the way to go, why bother using Access for data analysis? The honest answer: to avoid the limitations and issues that plague Excel.</p>
<p>     This is not meant to disparage Excel. Many people across varying industries have used Excel for years, considering it the tool of choice for performing and presenting data analysis. Anyone who does not understand Excel in today's business world is undoubtedly hiding that shameful fact. The interactive, impromptu analysis that Excel can perform makes it truly unique in the industry. However, Excel is not without its limitations, as you will see in the following section.</p>
<p> </p>
<p><span style="font-size: 12pt; text-decoration: underline;"><strong>Where Data Analysis with Excel Can Go Wrong<br />
</strong></span></p>
<p>     Years of consulting experience have brought me face to face with managers, accountants, and analysts who all have had to accept one simple fact: Their analytical needs had outgrown Excel. They all met with fundamental issues that stemmed from one or more of Excel's three problem areas: scalability, transparency of analytical processes, and separation of data and presentation.</p>
<p> </p>
<p><strong>Scalability<br />
</strong></p>
<p>    Scalability is the ability of an application to develop flexibly to meet growth and complexity requirements. In the context of this chapter, scalability refers to Excel's ability to handle ever-increasing volumes of data. Most Excel aficionados will be quick to point out that as of Excel 2007, you can place 1,048,576 rows of data into a single Excel worksheet. This is an overwhelming increase from the limitation of 65,536 rows imposed by previous versions of Excel. However, this increase in capacity does not solve all of the scalability issues that inundate Excel.</p>
<p>    Imagine that you are working in a small company and you are using Excel to analyze your daily transactions. As time goes on, you build a robust process complete with all the formulas, pivot tables, and macros you need to analyze the data stored in your neatly maintained worksheet.</p>
<p>   As your data grows, you will first notice performance issues. Your spreadsheet will become slow to load and then slow to calculate. Why will this happen? It has to do with the way Excel handles memory. When an Excel file is loaded, the entire file is loaded into memory. Excel does this to allow for quick data processing and access. The drawback to this behavior is that each time something changes in your spreadsheet, Excel has to reload the entire spreadsheet into memory. The net result in a large spreadsheet is that it takes a great deal of memory to process even the smallest change in your spreadsheet. Eventually, each action you take in your gigantic worksheet will become an excruciating wait.</p>
<p>     Your pivot tables will require bigger pivot caches, almost doubling your Excel workbook's file size. Eventually, your workbook will be too big to distribute easily. You may even consider breaking down the workbook into smaller workbooks (possibly one for each region). This causes you to duplicate your work. Not to mention the extra time and effort it would take should you want to recombine those workbooks.</p>
<p>   In time, you may eventually reach the 1,048,576-row limit of your worksheet. What happens then? Do you start a new worksheet? How do you analyze two datasets on two different worksheets as one entity? Are your formulas still good? Will you have to write new macros?  These are all issues you need to deal with.</p>
<p>    Of course, you will have the Excel power-users, who will find various clever ways to work around these limitations. In the end, though, they will always be just workarounds. Eventually, even these power-users will begin to think less about the most effective way to perform and present analysis of their data and more about how to make something "fit" into Excel without breaking their formulas and functions. Excel is flexible enough that a proficient user can make most things fit into Excel just fine. However, when users think only in terms of Excel, they are undoubtedly limiting themselves, albeit in an incredibly functional way.</p>
<p>   In addition, these capacity limitations often force Excel users to have the data prepared for them. That is, someone else extracts large chunks of data from a large database and then aggregates and shapes the data for use in Excel. Should the serious analyst always be dependent on someone else for his or her data needs? What if an analyst could be given the tools to access vast quantities of data without being reliant on others to provide data? Could that analyst be more valuable to the organization? Could that analyst focus on the accuracy of the analysis and the quality of the presentation, instead routing Excel data maintenance?</p>
<p>    Access is an excellent (many would say logical) next step for the analyst who faces an ever-increasing data pool. Since an Access table takes very few performance hits with larger datasets and has no predetermined row limitations, an analyst will be able to handle larger datasets without requiring the data to be summarized or prepared to fit into Excel. Since many tasks can be duplicated in both Excel and Access, an analyst proficient at both will be prepared for any situation. The alternative is telling everyone, "Sorry, it is not in Excel."</p>
<p>   Also, if ever a process becomes more crucial to the organization and needs to be tracked in a more enterprise-acceptable environment, it will be easier to upgrade and scale up if that process is already in Access.</p>
<p> </p>
<p><strong>Transparency of Analytical Processes<br />
</strong></p>
<p>     One of Excel's most attractive features is its flexibility. Each cell can contain text, a number, a formula, or practically anything else the user defines. Indeed, this is one of the fundamental reasons Excel is such an effective tool for data analysis. Users can use named ranges, formulas, and macros to create an intricate system of interlocking calculations, linked cells, and formatted summaries that work together to create a final analysis.</p>
<p>   So what is the problem with that? The problem is that there is no transparency of analytical processes. Thus, it is extremely difficult to determine what is actually going on in a spreadsheet. Anyone who has had to work with a spreadsheet created by someone else knows all too well the frustration that comes with deciphering the various gyrations of calculations and links being used to perform some analysis. Small spreadsheets performing modest analysis are painful to decipher, while large, elaborate, multi-worksheet workbooks are virtually impossible to decode, often leaving you to start from scratch.</p>
<p>    Even auditing tools available with most Excel add-in packages provide little relief. The figure below shows the results of a formula auditing tool run on an actual workbook used by a real company. It's a list of all the formulas in this workbook. The idea is to use this list to find and make sense of existing formulas. Notice that line one shows that there are 156 formulas. Yeah, this list helps a lot; good luck.</p>
<p><img src="http://datapigtechnologies.com/blog/wp-content/uploads/2010/03/031010_0557_TheCaseforA2.png" alt="" /></p>
<p> </p>
<p>   Compared to Excel, Access might seem rigid, strict, and unwavering in its rules. No, you can't put formulas directly into data fields. No, you can't link a data field to another table. To many users, Excel is the cool gym teacher who lets you do anything, while Access is the cantankerous librarian who has nothing but error messages for you. All this rigidity comes with a benefit, however.</p>
<p>   Since only certain actions are allowable, you can more easily come to understand what is being done with a set of data in Access. If a dataset is being edited, a number is being calculated, or if any portion of the dataset is being affected as a part of an analytical process, you will readily see that action. This is not to say that users can't do foolish and confusing things in Access. However, you definitely will not encounter hidden steps in an analytical process such as hidden formulas, hidden cells, or named ranges in dead worksheets.</p>
<p> </p>
<p><strong>Separation of Data and Presentation<br />
</strong></p>
<p>     Data should be separate from presentation; you do not want the data to become too tied to any particular way of presenting it. For example, when you receive an invoice from a company, you don't assume that the financial data on that invoice is the true source of your data. Rather, it is a presentation of your data. It can be presented to you in other manners and styles on charts or on websites, but such representations are never the actual source of data. This sounds obvious, but it becomes an important distinction when you study an approach of using Access and Excel together for data analysis.</p>
<p>     What exactly does this concept have to do with Excel? People who perform data analysis with Excel, more often than not, tend to fuse the data, the analysis, and the presentation together. For example, you will often see an Excel Workbook that has 12 worksheets, each representing a month. On each worksheet, data for that month is listed along with formulas, pivot tables, and summaries. What happens when you are asked to provide a summary by quarter? Do you add more formulas and worksheets to consolidate the data on each of the month worksheets? The fundamental problem in this scenario is that the worksheets actually represent data values that are fused into the presentation of your analysis. The point here is that data should not be tied to a particular presentation, no matter how apparently logical or useful it may be. However, in Excel, it happens all the time.</p>
<p>     In addition, as previously discussed, because all manners and phases of analysis can be done directly within a spreadsheet, Excel cannot effectively provide adequate transparency to the analysis. Each cell has the potential of holding formulas, being hidden, and containing links to other cells. In Excel, this blurs the line between analysis and data, which makes it difficult to determine exactly what is going on in a spreadsheet. Moreover, it takes a great deal of effort in the way of manual maintenance to ensure that edits and unforeseen changes don't affect previous analyses.</p>
<p>     Access inherently separates its analytical components into tables, queries, and reports. By separating these elements, Access makes data less sensitive to changes and creates a data analysis environment where you can easily respond to new requests for analysis without destroying previous analyses.</p>
<p>     Many who use Excel will find themselves manipulating its functionalities to approximate this database behavior. If you find yourself in this situation, you must consider that if you are using Excel's functionality to make it behave like a database application, perhaps the real thing just might have something to offer. Utilizing Access for data storage and analytical needs would enhance overall data analysis and would allow the Excel power-user to focus on the presentation in his or her spreadsheets.</p>
<p>     In the future, there will be more data, not less. Likewise, there will be more demands for complex data analysis, not fewer. Power-users are going to need to add some tools to their repertoire in order to get away from being simply spreadsheet mechanics. Excel can be stretched to do just about anything, but maintaining such creative solutions can be a tedious manual task. You can be sure that the sexy part of data analysis is not in routine data management within Excel. Rather, it is in the creation of slick processes and utilities that will provide your clients with the best solution for any situation.</p>
<p> </p>
<p> </p>
<p><span style="font-size: 12pt; text-decoration: underline;"><strong>Deciding Whether to Use Access or Excel<br />
</strong></span></p>
<p>     After such a critical view of Excel, it is important to say that the key to your success in the sphere of data analysis will not come from discarding Excel altogether and exclusively using Access. Your success will come from proficiency with both applications and the ability to evaluate a project and determine the best platform to use for your analytical needs. Are there hard-and-fast rules you can follow to make this determination? The answer is no, but there are some key indicators in every project you can consider as guidelines to determine whether to use Access or Excel. These indicators are the size of the data; the data's structure; the potential for data evolution; the functional complexity of the analysis; and the potential for shared processing.</p>
<p> </p>
<p><strong>Size of Data<br />
</strong></p>
<p>     The size of your dataset is the most obvious consideration you will have to take into account. Although Excel can handle more data than in previous versions, it is generally a good rule to start considering Access if your dataset begins to approach 100,000 rows. The reason for this is the fundamental way Access and Excel handle data.</p>
<p>     When you open an Excel file, the entire file is loaded into memory to ensure quick data processing and access. The drawback to this behavior is that Excel requires a great deal of memory to process even the smallest change in your spreadsheet. You may have noticed that when you try to perform an AutoFilter on a large formula-intensive dataset, Excel is slow to respond, giving you a Calculating indicator in the status bar. The larger your dataset is, the less efficient the data crunching in Excel will be.</p>
<p>     Access, on the other hand, does not follow the same behavior as Excel. When you open an Access table, it may seem as though the whole table is opening for you, but in reality Access is storing only a portion of data into memory at a time. This ensures the cost-effective use of memory and allows for more efficient data crunching on larger datasets. In addition, Access allows you to make use of Indexes that enable you to search, sort, filter, and query extremely large datasets very quickly.</p>
<p> </p>
<p><strong>Data Structure<br />
</strong></p>
<p>     If you are analyzing data that resides in a table that has no relationships with other tables, Excel is a fine choice for your analytical needs. However, if you have a series of tables that interact with each other (such as a Customers table, an Orders table, and an Invoices table), you should consider using Access. Access is a relational database, which means it is designed to handle the intricacies of interacting datasets. Some of these are the preservation of data integrity, the prevention of redundancy, and the efficient comparison and querying of data between the datasets. You will learn more about the concept of table relationships in Chapter 2.</p>
<p> </p>
<p><strong>Data Evolution<br />
</strong></p>
<p>     Excel is an ideal choice for quickly analyzing data used as a means to an end, such as a temporary dataset crunched to obtain a more valuable subset of data. The result of a pivot table is a perfect example of this kind of one-time data crunching. However, if you are building a long-term analytical process with data that has the potential of evolving and growing, Access is a better choice. Many analytical processes that start in Excel begin small and run fine, but as time passes these processes grow in both size and complexity until they reach the limits of Excel's capabilities. The message here is that you should use some foresight and consider future needs when determining which platform is best for your scenario.</p>
<p> </p>
<p><strong>Functional Complexity<br />
</strong></p>
<p>     There are far too many real-life examples of analytical projects where processes are forced into Excel even when Excel's limitations have been reached. How many times have you seen a workbook that contains an analytical process encapsulating multiple worksheets, macros, pivot tables, and formulas that add, average, count, look up, and link to other workbooks? The fact is that when Excel-based analytical processes become overly complex, they are difficult to manage, difficult to maintain, and difficult to translate to others. Consider using Access for projects that have complex, multiple-step analytical processes.</p>
<p> </p>
<p><strong>Shared Processing<br />
</strong></p>
<p>     Although it is possible to have multiple users work on one central Excel spreadsheet located on a network, ask anyone who has tried to coordinate and manage a central spreadsheet how difficult and restrictive it is. Data conflicts, loss of data, locked-out users, and poor data integrity are just a few examples of some of the problems you will encounter if you try to build a multiple-user process with Excel. Consider using Access for your shared processes. Access is better suited for a shared environment for many reasons, some of which are:</p>
<ul>
<li>the ability for users to concurrently enter and update data</li>
<li>inherent protection against data conflicts</li>
<li>prevention of data redundancy</li>
<li>protection against data entry errors</li>
</ul>
<p> </p>
<p> </p>
<p><span style="font-size: 12pt; text-decoration: underline;"><strong>An Excel User's Guide to Access: Don't Panic!<br />
</strong></span></p>
<p>     Many seasoned managers, accountants, and analysts come to realize that just because something can be done in Excel does not necessarily mean Excel is the best way to do it. This is the point when they decide to open Access for the first time. When they do open Access, the first object that looks familiar to them is the Access table. In fact, Access tables look so similar to an Excel spreadsheet that most Excel users try to use tables just like a spreadsheet. However, when they realize that they can't type formulas directly into the table or duplicate most of Excel's behavior and functionality, most of them wonder just what exactly the point of using Access is.</p>
<p>     When many Excel experts find out that Access does not behave or look like Excel, they write Access off as too difficult or as taking too much time to learn. However, the reality is that many of the concepts behind how data is stored and managed in Access are those with which the user is already familiar. Any Excel user has already learned such concepts in order to perform and present complex analysis. Investing a little time up front to see just how Access can be made to work for you can save a great deal of time in automating routine data processes.</p>
<p>     Throughout this book, you will learn various techniques in which you can use Access to perform much of the data analysis you are now performing exclusively in Excel. This section is a brief introduction to Access from an Excel expert's point of view. Here, you will focus on the big-picture items in Access. If some of the Access terms mentioned here are new or not terribly familiar, be patient. They will be covered in detail as the book progresses.</p>
<p> </p>
<p><strong>Tables<br />
</strong></p>
<p>      What will undoubtedly look most familiar to you are Access tables. tables appear almost identical to spreadsheets with familiar cells, rows, and columns. However, the first time you attempt to type a formula in one of the cells, you will see that Access tables do not possess Excel's flexible, multi-purpose nature that allows any cell to take on almost any responsibility or function.</p>
<p>     The Access table is simply a place to store data, such as numbers and text. All of the analysis and number crunching happens somewhere else. This way, data will never be tied to any particular analysis or presentation. Data is in raw form, which leaves users to determine how they want to analyze or display it. Chapter 2 will help you get started with a gentle introduction to Access basics.</p>
<p> </p>
<p><strong>Queries<br />
</strong></p>
<p>     You may have heard of Access queries but have never been able to relate to them.  Consider this: In Excel, when you use AutoFilter, a VLookup formula, or Subtotals, you are essentially running a query. A query is a question you pose against your data in order to get an answer or a result. The answer to a query can be a single data item, a Yes/No answer, or many rows of data. In Excel, the concept of querying data is a bit nebulous, as it can take the form of the different functionalities, such as formulas, AutoFilters, and Pivottables.</p>
<p>     In Access, a query is an actual object that has its own functionalities. A query is separate from a table, ensuring that data is never tied to any particular analysis. You will cover queries extensively in subsequent chapters. Your success in using Microsoft Access to enhance your data analysis will depend on your ability to create all manners of both simple and complex queries.  Chapter 3 begins your full emersion into all the functionality you can get from Access queries.</p>
<p> </p>
<p><strong>Reports<br />
</strong></p>
<p>     Access reports are an incredibly powerful component of Microsoft Access, which allow data to be presented in a variety of styles. Access reports, in and of themselves, provide an excellent illustration of one of the main points of this book: Data should be separate from analysis and presentation. The report serves as the presentation layer for a database, displaying various views into the data within. Acting as the presentation layer for your database, reports are inherently disconnected from the way your data is stored and structured. As long as the report receives the data it requires in order to accurately and cleanly present its information, it will not care where the information comes from.</p>
<p>     Access reports can have mixed reputations. On one hand, they can provide clean-looking PDF-esque reports that are ideal for invoices and form letters. On the other hand, Access reports are not ideal for showing the one-shot displays of data that Excel can provide. However, Access reports can easily be configured to prepare all manners of report styles, such as crosstabs, matrices, tabular layouts, and subtotaled layouts. You'll explore all the reporting options available to you starting in Chapter 11.</p>
<p> </p>
<p><strong>Macros and VBA<br />
</strong></p>
<p>     Just as Excel has macro and VBA functionality, Microsoft Access has its equivalents. This is where the true power and flexibility of Microsoft Access data analysis resides. Whether you are using them in custom functions, batch analysis, or automation, macros and VBA can add a customized flexibility that is hard to match using any other means. For example, you can use macros and VBA to automatically perform redundant analyses and recurring analytical processes, leaving you free to work on other tasks. Macros and VBA also allow you to reduce the chance of human error and to ensure that analyses are preformed the same way every time. Starting in Chapter 9, you will explore the benefits of macros and VBA and how you can leverage them to schedule and run batch analysis.</p>
<p> </p>
<p> </p>
<p><span style="font-size: 12pt; text-decoration: underline;"><strong>Summary<br />
</strong></span></p>
<p>     Although Excel is considered the premier tool for data analysis, Excel has some inherent characteristics that often lead to issues revolving around scalability, transparency of analytic processes, and confusion between data and presentation. Access has a suite of analytical tools that can help you avoid many of the issues that arise from Excel.</p>
<p>     First, Access can handle very large datasets and has no predetermined row limitation. This allows for the management and analysis of large datasets without the scalability issues that plague Excel. Access also forces transparency the separation of data and presentation by separating data into functional objects (that is, tables, queries, and reports) and by applying stringent rules that protect against bad processes and poor habits.</p>
<p>     As you go through this book, it is important to remember that your goal is not avoid Excel altogether but rather to broaden your toolset and to understand that, often, Access offers functionality that both enhances your analytical processes and makes your life easier.</p>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://datapigtechnologies.com/blog/index.php/the-big-grid-two-years-later/" rel="bookmark" class="crp_title">The Big Grid Two Years Later</a></li><li><a href="http://datapigtechnologies.com/blog/index.php/using-access-to-combine-multiple-excel-files-method-2/" rel="bookmark" class="crp_title">Using Access to Combine Multiple Excel Files: Method 2</a></li><li><a href="http://datapigtechnologies.com/blog/index.php/the-long-slow-summer-is-over/" rel="bookmark" class="crp_title">The Long Slow Summer is Over</a></li><li><a href="http://datapigtechnologies.com/blog/index.php/cut-the-size-of-your-pivot-table-workbooks-in-half/" rel="bookmark" class="crp_title">Cut the Size of Your Pivot Table Workbooks in Half</a></li><li><a href="http://datapigtechnologies.com/blog/index.php/using-access-to-combine-multiple-excel-files-method-1/" rel="bookmark" class="crp_title">Using Access to Combine Multiple Excel Files: Method 1</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://datapigtechnologies.com/blog/index.php/the-case-for-access/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
		<item>
		<title>Integrating Xcelsius with Excel and Access</title>
		<link>http://datapigtechnologies.com/blog/index.php/integrating-xcelsius-with-excel-and-access/</link>
		<comments>http://datapigtechnologies.com/blog/index.php/integrating-xcelsius-with-excel-and-access/#comments</comments>
		<pubDate>Wed, 10 Feb 2010 19:07:51 +0000</pubDate>
		<dc:creator>datapig</dc:creator>
				<category><![CDATA[Access VBA]]></category>
		<category><![CDATA[Excel VBA]]></category>
		<category><![CDATA[Visualizations]]></category>
		<category><![CDATA[Xcelsius]]></category>
		<category><![CDATA[Access]]></category>
		<category><![CDATA[Excel]]></category>
		<category><![CDATA[Integration]]></category>
		<category><![CDATA[Power Tips]]></category>
		<category><![CDATA[VBA]]></category>
		<category><![CDATA[Visualization]]></category>

		<guid isPermaLink="false">http://datapigtechnologies.com/blog/?p=1708</guid>
		<description><![CDATA[Being the complete nerd that I am, I work with lots of different technologies. But in the end, I always strive to make those technologies work with Excel. One of those is Xcelsius. Xcelsius is a dashboarding application that takes data and spices it up into slick looking flash presentations.

Those of you who have already [...]]]></description>
			<content:encoded><![CDATA[<p>Being the complete nerd that I am, I work with lots of different technologies. But in the end, I always strive to make those technologies work with Excel. One of those is Xcelsius. Xcelsius is a dashboarding application that takes data and spices it up into slick looking flash presentations.<br />
<br />
Those of you who have already been asked to create reporting in Xcelsius may have found it a bit difficult to use.  No VBA, no easy way to get connections and no pivot tables.<br />
<br />
Well for the upcoming Xcelsius Developer's Workshop, I've come up with a technique where you can embed Xcelsius dashboards into Excel and Access applications.<br />
<br />
This allows you to get all the flashy benefits of Xcelsius, but still give users a familiar environment where they can use PivotTables, VBA, MSQuery, etc.<br />
<br />
It's too complicated to show with pictures, so I cooked up this video.  Enjoy!<br />
<span id="more-1708"></span><br />
<br />
<object id="csSWF" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="580" height="438" codebase="http://active.macromedia.com/flash7/cabs/ swflash.cab#version=9,0,115,0"><param name="src" value="http://datapigtechnologies.com/flashfiles/EmbeddingXcelsius.swf"/><param name="bgcolor" value="#1a1a1a"/><param name="quality" value="best"/><param name="allowScriptAccess" value="always"/><param name="allowFullScreen" value="true"/><param name="scale" value="showall"/><param name="flashVars" value="autostart=false"/><embed name="csSWF" src="http://datapigtechnologies.com/flashfiles/EmbeddingXcelsius.swf" width="580" height="438" bgcolor="#1a1a1a" quality="best" allowScriptAccess="always" allowFullScreen="true" scale="showall" flashVars="autostart=false&#038;color=0x1A1A1A,0x1A1A1A" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></embed></object></p>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://datapigtechnologies.com/blog/index.php/the-impenetrable-hiring-test/" rel="bookmark" class="crp_title">The Impenetrable Hiring Test</a></li><li><a href="http://datapigtechnologies.com/blog/index.php/getting-kicked-off-of-xbox-live/" rel="bookmark" class="crp_title">Getting Kicked Off Xbox Live</a></li><li><a href="http://datapigtechnologies.com/blog/index.php/mothers-day-psa/" rel="bookmark" class="crp_title">Mother’s Day PSA</a></li><li><a href="http://datapigtechnologies.com/blog/index.php/a-tribute-to-lost/" rel="bookmark" class="crp_title">A Tribute to Lost</a></li><li><a href="http://datapigtechnologies.com/blog/index.php/the-new-badass-bass/" rel="bookmark" class="crp_title">The New BadAss Bass</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://datapigtechnologies.com/blog/index.php/integrating-xcelsius-with-excel-and-access/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Avoiding Data Cut-Off in Excel</title>
		<link>http://datapigtechnologies.com/blog/index.php/avoiding-data-cut-off-in-excel/</link>
		<comments>http://datapigtechnologies.com/blog/index.php/avoiding-data-cut-off-in-excel/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 14:30:32 +0000</pubDate>
		<dc:creator>datapig</dc:creator>
				<category><![CDATA[Access Tips and Tricks]]></category>
		<category><![CDATA[Excel & Access Integration]]></category>
		<category><![CDATA[Excel Tips and Tricks]]></category>
		<category><![CDATA[Access]]></category>
		<category><![CDATA[Excel]]></category>
		<category><![CDATA[Integration]]></category>
		<category><![CDATA[Tips and Tricks]]></category>

		<guid isPermaLink="false">http://datapigtechnologies.com/blog/?p=1679</guid>
		<description><![CDATA[It's been a busy week and I've been working hard. I think I'll reward myself by writing a blog post for people I've never met. Here we go.
Let's talk about getting Access Memo Fields into Excel.
 
So you're there you are, happily copying data from this Access table to Excel. Notice the comment length here (big [...]]]></description>
			<content:encoded><![CDATA[<p>It's been a busy week and I've been working hard. I think I'll reward myself by writing a blog post for people I've never met. Here we go.</p>
<p>Let's talk about getting Access Memo Fields into Excel.</p>
<p> <span id="more-1679"></span></p>
<p>So you're there you are, happily copying data from this Access table to Excel. Notice the comment length here (big stuff).</p>
<p><img src="http://datapigtechnologies.com/blog/wp-content/uploads/2010/02/020310_1430_GettingAcce1.png" alt="" /></p>
<p> </p>
<p> </p>
<p>Then you figure out that Access is cutting off your 'comments' field at 255 characters.</p>
<p><img src="http://datapigtechnologies.com/blog/wp-content/uploads/2010/02/020310_1430_GettingAcce2.png" alt="" /></p>
<p> </p>
<p>This is because your 'comments' field is actually a Memo data type. In a field designated as a Memo field, you can enter as many characters as you like (no 255 character limit). Unfortunately, copying and pasting Memo fields into Excel will result in data that is cut off. I know…Excel can handle well over 30,000 characters in a cell. The problem is when you copy and paste from Access, Access still exports only 255 characters for backwards compatibility purposes.</p>
<p> </p>
<p>So what do you do?</p>
<p>(a) Start copying and pasting individual comments 255 characters at a time.</p>
<p>(b) Parse your comments into separate 255-character fields, then concatenate them in Excel.</p>
<p>(c) Get a job at Barnes &amp; Noble to spend your days alphabetizing books.</p>
<p>The answer is (c). </p>
<p>But just in case you can't afford to quit your job, here are a couple of methods you can use to get Access Memo fields into Excel.</p>
<p> </p>
<p><span style="font-size:12pt"><strong>Method 1: Use the Export with Formatting Option<br />
</strong></span></p>
<p>Right click on your table and choose to export it.</p>
<p><img src="http://datapigtechnologies.com/blog/wp-content/uploads/2010/02/020310_1430_GettingAcce3.png" alt="" /></p>
<p> </p>
<p>When choosing an output, be sure to select the 'Export data with formatting and layout' option.</p>
<p><img src="http://datapigtechnologies.com/blog/wp-content/uploads/2010/02/020310_1430_GettingAcce4.png" alt="" /></p>
<p> </p>
<p> </p>
<p><span style="font-size:12pt"><strong>Method 2: Use a TransferSpreadsheet Macro<br />
</strong></span></p>
<p>You can also create a Macro to use the TransferSpreadsheet action. Using this action will bypass Access' tendency to cut data off to 255 characters.</p>
<p>As you can see, you'll have to identify the source table, and the destination path.</p>
<p> </p>
<p><img src="http://datapigtechnologies.com/blog/wp-content/uploads/2010/02/020310_1430_GettingAcce5.png" alt="" /><strong><br />
</strong></p>
<p> </p>
<p> </p>
<p>There you have it. Now if you'll excuse me, I've got to go get ready for my Barnes &amp; Noble interview.</p>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://datapigtechnologies.com/blog/index.php/cant-export-more-than-65000-rows-to-excel-2007/" rel="bookmark" class="crp_title">Can’t Export More than 65,000 Rows to Excel 2007?</a></li><li><a href="http://datapigtechnologies.com/blog/index.php/padding-numbers-with-zeros/" rel="bookmark" class="crp_title">Padding Numbers with Zeros</a></li><li><a href="http://datapigtechnologies.com/blog/index.php/using-access-to-combine-multiple-excel-files-method-2/" rel="bookmark" class="crp_title">Using Access to Combine Multiple Excel Files: Method 2</a></li><li><a href="http://datapigtechnologies.com/blog/index.php/removing-user-name-from-comments/" rel="bookmark" class="crp_title">Removing User Name from Comments</a></li><li><a href="http://datapigtechnologies.com/blog/index.php/documenting-access-queries-in-excel/" rel="bookmark" class="crp_title">Documenting Access Queries in Excel</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://datapigtechnologies.com/blog/index.php/avoiding-data-cut-off-in-excel/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Clearing Access ImportError Tables</title>
		<link>http://datapigtechnologies.com/blog/index.php/clearing-access-importerror-tables/</link>
		<comments>http://datapigtechnologies.com/blog/index.php/clearing-access-importerror-tables/#comments</comments>
		<pubDate>Tue, 26 Jan 2010 11:09:10 +0000</pubDate>
		<dc:creator>datapig</dc:creator>
				<category><![CDATA[Access Tips and Tricks]]></category>
		<category><![CDATA[Access VBA]]></category>
		<category><![CDATA[Excel & Access Integration]]></category>
		<category><![CDATA[Access]]></category>
		<category><![CDATA[Integration]]></category>
		<category><![CDATA[Tips and Tricks]]></category>

		<guid isPermaLink="false">http://datapigtechnologies.com/blog/?p=1640</guid>
		<description><![CDATA[If you move data from Excel to Access on a regular basis, you'll know that sometimes Access can't resolve the data being imported from Excel. In these cases Access automatically creates a new table called ImportErrors..
.
The ImportErrors table is supposed to log all the data points that failed to be imported. For example, imagine I [...]]]></description>
			<content:encoded><![CDATA[<p>If you move data from Excel to Access on a regular basis, you'll know that sometimes Access can't resolve the data being imported from Excel. In these cases Access automatically creates a new table called ImportErrors.<span style="color: #ffffff;">.<br />
.<span id="more-1640"></span></span></p>
<p>The ImportErrors table is supposed to log all the data points that failed to be imported. For example, imagine I have an Excel table with two columns Customer Number and Contract Number. Each column contains numbers, but let's say some entries are "NA". When Access tries to import this table, it'll interpret the two columns as Number columns and will throw out the NA values.<span style="color: #ffffff;">.<br />
.</span></p>
<p>In a gesture of good will, Access will create an ImportError table to tell you which data points were ignored. Here's what this table looks like:</p>
<p><img src="http://datapigtechnologies.com/blog/wp-content/uploads/2010/01/012610_1108_ClearingAcc1.png" alt="" /></p>
<p> </p>
<p>Well, this is semi-useful….sometimes.</p>
<p>Often times though, the errors are legitimate and benign (like "NA" being ignored in a Number field). But Access, like an OCD Uncle, continues to push out the ImportError tables.</p>
<p>After a few imports, your database will start looking like this:</p>
<p><img src="http://datapigtechnologies.com/blog/wp-content/uploads/2010/01/012610_1108_ClearingAcc2.png" alt="" /></p>
<p> <span style="color: #ffffff;">..</span></p>
<p>If you have an automated import feed coming in every Month, you'll eventually end up with a database full of ImportError tables.<span style="color: #ffffff;">.<br />
.</span></p>
<p>Before you ask, NO there isn't a way to suppress the creation of ImportError tables.  What you can do, however, is run a procedure to delete all ImportError tables. The idea is to run this piece of code after your automated import processes. This way, your database won't be inundated with ImportError Tables.</p>
<div class="syntax_hilite">
<div id="vb-4">
<div class="vb"><span style="color: #b1b100;">Function</span> DeleteImportErrorTables<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span><br />
<span style="color: #b1b100;">Dim</span> oTable <span style="color: #b1b100;">As</span> DAO.<span style="color: #66cc66;">TableDef</span></p>
<p><span style="color: #b1b100;">For</span> Each oTable In CurrentDb.<span style="color: #66cc66;">TableDefs</span><br />
<span style="color: #b1b100;">If</span> oTable.<span style="color: #b1b100;">Name</span> Like <span style="color: #ff0000;">"*ImportErrors*"</span> <span style="color: #b1b100;">Then</span><br />
CurrentDb.<span style="color: #66cc66;">TableDefs</span>.<span style="color: #66cc66;">Delete</span> oTable.<span style="color: #b1b100;">Name</span><br />
<span style="color: #b1b100;">End</span> <span style="color: #b1b100;">If</span><br />
<span style="color: #b1b100;">Next</span> oTable</p>
<p><span style="color: #b1b100;">End</span> <span style="color: #b1b100;">Function</span></div>
</div>
</div>
<p></p>
<p><span style="color: #ffffff;">.<br />
.</span><br />
So OCD Access can keep creating its ImportError tables and you can automatically blow them away. You're both happy.</p>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://datapigtechnologies.com/blog/index.php/comparing-tables-with-a-pivottable/" rel="bookmark" class="crp_title">Comparing Tables with a PivotTable</a></li><li><a href="http://datapigtechnologies.com/blog/index.php/transposing-a-dataset-in-access/" rel="bookmark" class="crp_title">Transposing a Dataset in Access</a></li><li><a href="http://datapigtechnologies.com/blog/index.php/easily-move-access-query-results-to-excel/" rel="bookmark" class="crp_title">Easily Move Access Query Results to Excel</a></li><li><a href="http://datapigtechnologies.com/blog/index.php/creating-system-tables-in-access/" rel="bookmark" class="crp_title">Creating System Tables in Access</a></li><li><a href="http://datapigtechnologies.com/blog/index.php/copying-vlookups-across-multiple-columns/" rel="bookmark" class="crp_title">Copying VLOOKUPs Across Multiple Columns</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://datapigtechnologies.com/blog/index.php/clearing-access-importerror-tables/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>The Benefits of a Good Technical Editor</title>
		<link>http://datapigtechnologies.com/blog/index.php/the-benefits-of-a-good-technical-editor/</link>
		<comments>http://datapigtechnologies.com/blog/index.php/the-benefits-of-a-good-technical-editor/#comments</comments>
		<pubDate>Fri, 04 Dec 2009 12:30:40 +0000</pubDate>
		<dc:creator>datapig</dc:creator>
				<category><![CDATA[Access Queries]]></category>
		<category><![CDATA[Excel & Access Integration]]></category>
		<category><![CDATA[Access]]></category>
		<category><![CDATA[Excel]]></category>
		<category><![CDATA[Integration]]></category>
		<category><![CDATA[Queries]]></category>

		<guid isPermaLink="false">http://datapigtechnologies.com/blog/?p=1353</guid>
		<description><![CDATA[I'm in the process of writing my Pulitzer worthy book "An Excel Analyst's guide to Access".  During the writing process, chapters get reviewed by a team of editors - one of which is a Technical Editor. 
The Technical Editor on this book is Dick Kusleika (Daily Dose of Excel).  Kusleika is one of the better technical [...]]]></description>
			<content:encoded><![CDATA[<p>I'm in the process of writing my Pulitzer worthy book "An Excel Analyst's guide to Access".  During the writing process, chapters get reviewed by a team of editors - one of which is a Technical Editor. </p>
<p>The Technical Editor on this book is Dick Kusleika (<a href="http://www.dailydoseofexcel.com" target="_blank">Daily Dose of Excel</a>).  Kusleika is one of the better technical editors I've worked with.  I think his accountant's detail-oriented brain lends itself nicely to tech editing. </p>
<p><strong>Quick  Joke:</strong>  Did you hear about extroverted accountant?  He looks down at <em>your</em> shoes. </p>
<p><span style="color: #ffffff;">.</span></p>
<p>During his editing, Kusleika pointed out that that the serial dates in Access actually start at December 31, 1899 (not January 1, 1900 like in Excel). </p>
<p><span id="more-1353"></span></p>
<p>In Excel, every possible date starting from January 1, 1900 is stored as a serial number. For example, January 1, 1900 is stored as 1; January 2, 1900 is stored as 2; and so on. This system of storing dates as serial numbers is commonly called the 1900 system.</p>
<p><span style="color: #ffffff;"><span style="color: #ffffff;">.</span></span></p>
<p>In Access, it's different.  </p>
<p>Run this Select Query in Access and you'll get the number 2.   </p>
<p><strong>SELECT CLng(#1/1/1900#) AS Expr1</strong></p>
<p>Apparently December 31, 1899 is 1. </p>
<p>How have I missed that?!!</p>
<p><span style="color: #ffffff;"><span style="color: #ffffff;">.</span></span></p>
<p>I'm assuming Access is different because the SQL team actually wrote the original Jet engine that Access runs on.  Their date system didn't have to be based on an old Lotus product like in Excel. </p>
<p><span style="color: #ffffff;"><span style="color: #ffffff;">.</span></span></p>
<p>I haven't quite gotten my brain around the implications of this difference between the serial dates in Excel and Access.  Is there any scenario where this difference would affect date-based analyses?</p>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://datapigtechnologies.com/blog/index.php/trouble-in-datapig-land/" rel="bookmark" class="crp_title">Trouble in DataPig Land</a></li><li><a href="http://datapigtechnologies.com/blog/index.php/easily-move-access-query-results-to-excel/" rel="bookmark" class="crp_title">Easily Move Access Query Results to Excel</a></li><li><a href="http://datapigtechnologies.com/blog/index.php/4-year-olds-take-on-xmas/" rel="bookmark" class="crp_title">The 4 Year Old's Take on Christmas</a></li><li><a href="http://datapigtechnologies.com/blog/index.php/excel-defunct-defaults/" rel="bookmark" class="crp_title">Excel Defunct Defaults</a></li><li><a href="http://datapigtechnologies.com/blog/index.php/special-characters-are-a-pain-in-the-asterisk/" rel="bookmark" class="crp_title">Special Characters are a Pain in the Asterisk</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://datapigtechnologies.com/blog/index.php/the-benefits-of-a-good-technical-editor/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Easily Move Access Query Results to Excel</title>
		<link>http://datapigtechnologies.com/blog/index.php/easily-move-access-query-results-to-excel/</link>
		<comments>http://datapigtechnologies.com/blog/index.php/easily-move-access-query-results-to-excel/#comments</comments>
		<pubDate>Thu, 19 Nov 2009 20:02:41 +0000</pubDate>
		<dc:creator>datapig</dc:creator>
				<category><![CDATA[Excel & Access Integration]]></category>
		<category><![CDATA[Access]]></category>
		<category><![CDATA[Excel]]></category>
		<category><![CDATA[Integration]]></category>
		<category><![CDATA[Queries]]></category>

		<guid isPermaLink="false">http://datapigtechnologies.com/blog/?p=1292</guid>
		<description><![CDATA[Just the other day, I saw someone run an Access Query in Office 2003. Then he selected Office Tools -&#62;Analyze with Excel.  This essentially sends the results of the Access query to Excel.
.
This if fine and dandy, but there is a slightly easier way to get the results of an Access query to Excel.
.
You don't have to even open [...]]]></description>
			<content:encoded><![CDATA[<p>Just the other day, I saw someone run an Access Query in Office 2003. Then he selected Office Tools -&gt;Analyze with Excel.  This essentially sends the results of the Access query to Excel.</p>
<p><span style="color: #ffffff;">.</span></p>
<p>This if fine and dandy, but there is a slightly easier way to get the results of an Access query to Excel.</p>
<p><span style="color: #ffffff;">.<span id="more-1292"></span></span></p>
<p>You don't have to even open the query .  Simply drag the query to the Excel spreadsheet and presto.  The query will automatically run and output the results.</p>
<p><img class="alignnone size-full wp-image-1293" title="DragQuery" src="http://datapigtechnologies.com/blog/wp-content/uploads/2009/11/DragQuery.png" alt="DragQuery" width="447" height="379" /></p>
<p><span style="color: #ffffff;">.</span></p>
<p>What about parameter queries you ask?  Well, those will run too.  Access will ask you for your parameters and the result will shoot over to Excel.</p>
<p>This works for Tables too.</p>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://datapigtechnologies.com/blog/index.php/adding-data-bars-to-access-queries/" rel="bookmark" class="crp_title">Adding Data Bars to Access Queries</a></li><li><a href="http://datapigtechnologies.com/blog/index.php/building-access-macros-is-a-drag/" rel="bookmark" class="crp_title">Building Access Macros is a Drag</a></li><li><a href="http://datapigtechnologies.com/blog/index.php/running-an-access-parameter-query-from-excel/" rel="bookmark" class="crp_title">Running an Access Parameter Query from Excel</a></li><li><a href="http://datapigtechnologies.com/blog/index.php/passing-multiple-values-to-one-parameter/" rel="bookmark" class="crp_title">Passing Multiple Values to One Parameter</a></li><li><a href="http://datapigtechnologies.com/blog/index.php/creating-a-histogram-in-access/" rel="bookmark" class="crp_title">Creating a Histogram in Access</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://datapigtechnologies.com/blog/index.php/easily-move-access-query-results-to-excel/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Documenting Access Queries in Excel</title>
		<link>http://datapigtechnologies.com/blog/index.php/documenting-access-queries-in-excel/</link>
		<comments>http://datapigtechnologies.com/blog/index.php/documenting-access-queries-in-excel/#comments</comments>
		<pubDate>Mon, 26 Oct 2009 08:19:58 +0000</pubDate>
		<dc:creator>datapig</dc:creator>
				<category><![CDATA[Access Queries]]></category>
		<category><![CDATA[Access VBA]]></category>
		<category><![CDATA[Excel & Access Integration]]></category>
		<category><![CDATA[Access]]></category>
		<category><![CDATA[Excel]]></category>
		<category><![CDATA[Integration]]></category>
		<category><![CDATA[Power Tips]]></category>
		<category><![CDATA[Queries]]></category>
		<category><![CDATA[VBA]]></category>

		<guid isPermaLink="false">http://datapigtechnologies.com/blog/?p=1189</guid>
		<description><![CDATA[Clients usually have this pesky need to have everything documented. As a generally lazy person, this offends my lackadaisical attitude. Nevertheless, I typically oblige, given the fact that I want them to take over the work at some point.
 
Over the years, I've rolled my own documentation tools to help in this endeavor. Today, I want [...]]]></description>
			<content:encoded><![CDATA[<p>Clients usually have this pesky need to have everything documented. As a generally lazy person, this offends my lackadaisical attitude. Nevertheless, I typically oblige, given the fact that I want them to take over the work at some point.</p>
<p> </p>
<p>Over the years, I've rolled my own documentation tools to help in this endeavor. Today, I want to share a small procedure I use to document Access queries in Excel.</p>
<p> <span id="more-1189"></span></p>
<p>Copy this code into a standard module in Access.</p>
<div class="syntax_hilite">
<div id="vb-6">
<div class="vb"><span style="color: #b1b100;">Function</span> Document_My_Queries<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span><br />
<span style="color: #b1b100;">Dim</span> TempTable <span style="color: #b1b100;">As</span> DAO.<span style="color: #b1b100;">Recordset</span><br />
<span style="color: #b1b100;">Dim</span> QryDef <span style="color: #b1b100;">As</span> <span style="color: #b1b100;">QueryDef</span><br />
<span style="color: #b1b100;">Dim</span> QryName <span style="color: #b1b100;">As</span> <span style="color: #b1b100;">String</span><br />
<span style="color: #b1b100;">Dim</span> strSQL <span style="color: #b1b100;">As</span> <span style="color: #b1b100;">String</span></p>
<p><span style="color: #808080;">'Step 1: Start with a fresh QueryList table</span><br />
<span style="color: #b1b100;">On</span> <span style="color: #b1b100;">Error</span> <span style="color: #b1b100;">Resume</span> <span style="color: #b1b100;">Next</span><br />
docmd.<span style="color: #66cc66;">DeleteObject</span> acTable, <span style="color: #ff0000;">"QueryList"</span><br />
CurrentDb.<span style="color: #66cc66;">Execute</span> _<br />
<span style="color: #ff0000;">"CREATE TABLE QueryList (QueryName text(100), DateCreated Date, LastUpdated Date, SQL memo)"</span>, dbFailOnError<br />
<span style="color: #b1b100;">On</span> <span style="color: #b1b100;">Error</span> <span style="color: #b1b100;">GoTo</span> <span style="color: #cc66cc;">0</span></p>
<p><span style="color: #808080;">'Step 2: Open the QueryList table</span><br />
<span style="color: #b1b100;">Set</span> TempTable = CurrentDb.<span style="color: #66cc66;">OpenRecordset</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #ff0000;">"QueryList"</span><span style="color:#006600; font-weight:bold;">&#41;</span></p>
<p><span style="color: #808080;">'Step 3: Loop through all queries and fill the QueryList table with Query Def info</span><br />
<span style="color: #b1b100;">For</span> Each QryDef In CurrentDb.<span style="color: #66cc66;">QueryDefs</span><br />
<span style="color: #808080;">'Exclude deleted querys</span><br />
<span style="color: #b1b100;">If</span> <span style="color: #b1b100;">Left</span><span style="color:#006600; font-weight:bold;">&#40;</span>QryDef.<span style="color: #b1b100;">Name</span>, <span style="color: #cc66cc;">1</span><span style="color:#006600; font-weight:bold;">&#41;</span> = <span style="color: #ff0000;">"~"</span> <span style="color: #b1b100;">Then</span><br />
<span style="color: #b1b100;">GoTo</span> SKIPIT<br />
<span style="color: #b1b100;">End</span> <span style="color: #b1b100;">If</span><br />
TempTable.<span style="color: #66cc66;">AddNew</span><br />
TempTable!QueryName = QryDef.<span style="color: #b1b100;">Name</span><br />
TempTable!DateCreated = QryDef.<span style="color: #66cc66;">DateCreated</span><br />
TempTable!LastUpdated = QryDef.<span style="color: #66cc66;">LastUpdated</span><br />
TempTable!SQL = QryDef.<span style="color: #66cc66;">SQL</span><br />
TempTable.<span style="color: #66cc66;">Update</span><br />
SKIPIT:<br />
<span style="color: #b1b100;">Next</span></p>
<p><span style="color: #808080;">'Step 4: Use TransferSpreadsheet to export to Excel</span><br />
docmd.<span style="color: #66cc66;">TransferSpreadsheet</span> acExport, <span style="color: #cc66cc;">8</span>, <span style="color: #ff0000;">"QueryList"</span>, _<br />
CurrentProject.<span style="color: #66cc66;">Path</span> &amp;amp; <span style="color: #ff0000;">"\MyQueries.xls"</span>, <span style="color: #b1b100;">True</span>, <span style="color: #ff0000;">""</span></p>
<p><span style="color: #b1b100;">End</span> <span style="color: #b1b100;">Function</span></div>
</div>
</div>
<p></p>
<p> </p>
<p>In Step 1, you create a fresh QueryList table. This table will hold the info about your queries. If a QueryList table already exists, it gets blown away and replaced by a fresh one.</p>
<p>In Step 2, you open the QueryList table into a recordset.</p>
<p>In Step 3, you loop through all the queries in the database (skipping the ghost queries that start with ~) and you log the needed info into the QueryList table.</p>
<p>In Step 4, you use the TransferSpreadsheet method to send the QueryList table to Excel. TransferSpreadsheet will allow the ultra-long SQL statements to survive Excel's 255 character limit for a cell. Meaning, the SQL statements won't be cut off at 255 characters.<br />
The workbook will be saved into a file called MyQueries.xls in the same directory as the host database.</p>
<p> </p>
<p>Here's what the final spreadsheet looks like.</p>
<p><img src="http://datapigtechnologies.com/blog/wp-content/uploads/2009/10/102609_0819_Documenting1.png" alt="" /></p>
<p>Why send this info to Excel?  I find that an Excel workbook makes for a nice documentation file, allowing me to partition different aspects of my documentation into tabs.  Queries on one tab, Tables on one tab, Forms on one tab, etc.  </p>
<p>Outside of documentation, you can also use this to essentially create a backup of the queries in your database.</p>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://datapigtechnologies.com/blog/index.php/transposing-a-dataset-in-access/" rel="bookmark" class="crp_title">Transposing a Dataset in Access</a></li><li><a href="http://datapigtechnologies.com/blog/index.php/sending-data-to-excel-using-access-sql/" rel="bookmark" class="crp_title">Sending Data to Excel using Access SQL</a></li><li><a href="http://datapigtechnologies.com/blog/index.php/running-an-access-parameter-query-from-excel/" rel="bookmark" class="crp_title">Running an Access Parameter Query from Excel</a></li><li><a href="http://datapigtechnologies.com/blog/index.php/dynamically-adding-primary-keys/" rel="bookmark" class="crp_title">Dynamically Adding Primary Keys</a></li><li><a href="http://datapigtechnologies.com/blog/index.php/using-access-to-combine-multiple-excel-files-method-2/" rel="bookmark" class="crp_title">Using Access to Combine Multiple Excel Files: Method 2</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://datapigtechnologies.com/blog/index.php/documenting-access-queries-in-excel/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
