<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: MS-Access And Data Processing-2</title>
	<atom:link href="http://msaccesstips.com/2009/11/ms-access-and-data-processing-2/feed/" rel="self" type="application/rss+xml" />
	<link>http://msaccesstips.com/2009/11/ms-access-and-data-processing-2/</link>
	<description>Free MS-Access downloads</description>
	<lastBuildDate>Wed, 23 May 2012 11:14:48 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: Null Query Access &#124; More More Pics</title>
		<link>http://msaccesstips.com/2009/11/ms-access-and-data-processing-2/comment-page-1/#comment-2790</link>
		<dc:creator>Null Query Access &#124; More More Pics</dc:creator>
		<pubDate>Sat, 19 Feb 2011 11:36:39 +0000</pubDate>
		<guid isPermaLink="false">http://msaccesstips.com/?p=31#comment-2790</guid>
		<description>[...] Null Values when data is msaccesstips.com [...]</description>
		<content:encoded><![CDATA[<p>[...] Null Values when data is msaccesstips.com [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: a.p.r. pillai</title>
		<link>http://msaccesstips.com/2009/11/ms-access-and-data-processing-2/comment-page-1/#comment-8</link>
		<dc:creator>a.p.r. pillai</dc:creator>
		<pubDate>Tue, 24 Nov 2009 19:27:35 +0000</pubDate>
		<guid isPermaLink="false">http://msaccesstips.com/?p=31#comment-8</guid>
		<description>I am sorry if you felt offended by my remarks.  I accept your example as a simplified version of the solution with PIVOT Table that needs only fewer steps.&lt;br /&gt;&lt;br /&gt;I also accept my ignorance in the usage of PIVOT Table except a few trial runs I did few years back and discarded it from my data processing solutions as it has only limited flexibility in presentation and distribution of information like Reports.&lt;br /&gt;&lt;br /&gt;Regards,</description>
		<content:encoded><![CDATA[<p>I am sorry if you felt offended by my remarks.  I accept your example as a simplified version of the solution with PIVOT Table that needs only fewer steps.</p>
<p>I also accept my ignorance in the usage of PIVOT Table except a few trial runs I did few years back and discarded it from my data processing solutions as it has only limited flexibility in presentation and distribution of information like Reports.</p>
<p>Regards,</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://msaccesstips.com/2009/11/ms-access-and-data-processing-2/comment-page-1/#comment-9</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Tue, 24 Nov 2009 00:39:43 +0000</pubDate>
		<guid isPermaLink="false">http://msaccesstips.com/?p=31#comment-9</guid>
		<description>In my earlier comments, you criticized my method for combining two queries to represent the months being displayed as columns. This was to show how I arrived at your sample image. Your response was that it would be necessary to create new queries for each month and you had a solution that only required two steps.&lt;br /&gt;&lt;br /&gt;Looking at your two steps above, they are essentially exactly the same as the solution that I provided? The extra steps you describe above are needed in your solution to provide the end result which is to have all the months in the year as columns. In my last comment I showed the solution to use just two queries to achieve the desired result, with the help of pivottable view. Here are the SQL strings in full...&lt;br /&gt;&lt;br /&gt;The table that holds the data is called tbl_test and I called this query &quot;qry_test_part1&quot;&lt;br /&gt;TRANSFORM Sum(tbl_test.Amount) AS SumOfAmount&lt;br /&gt;SELECT tbl_test.Location, tbl_test.Year, tbl_test.Month&lt;br /&gt;FROM tbl_test&lt;br /&gt;GROUP BY tbl_test.Location, tbl_test.Year, tbl_test.Month&lt;br /&gt;PIVOT tbl_test.Type;&lt;br /&gt;&lt;br /&gt;The second query uses qry_test_part1 as it&#039;s source table.&lt;br /&gt;&lt;br /&gt;SELECT qry_test_part1.Location, qry_test_part1.Year, qry_test_part1.Month, qry_test_part1.E, qry_test_part1.R, [R]-[E] AS [P+L]&lt;br /&gt;FROM qry_test_part1&lt;br /&gt;GROUP BY qry_test_part1.Location, qry_test_part1.Year, qry_test_part1.Month, qry_test_part1.E, qry_test_part1.R, [R]-[E];&lt;br /&gt;&lt;br /&gt;It is this second query that you need to use pivottable view and choose the fields as I explained in my last comments.&lt;br /&gt;&lt;br /&gt;You will find this query provides everything you needed, where each new month and location added will automatically show in the query without any further queries needing to be created, along with the year.&lt;br /&gt;&lt;br /&gt;Regards</description>
		<content:encoded><![CDATA[<p>In my earlier comments, you criticized my method for combining two queries to represent the months being displayed as columns. This was to show how I arrived at your sample image. Your response was that it would be necessary to create new queries for each month and you had a solution that only required two steps.</p>
<p>Looking at your two steps above, they are essentially exactly the same as the solution that I provided? The extra steps you describe above are needed in your solution to provide the end result which is to have all the months in the year as columns. In my last comment I showed the solution to use just two queries to achieve the desired result, with the help of pivottable view. Here are the SQL strings in full&#8230;</p>
<p>The table that holds the data is called tbl_test and I called this query &quot;qry_test_part1&quot;<br />TRANSFORM Sum(tbl_test.Amount) AS SumOfAmount<br />SELECT tbl_test.Location, tbl_test.Year, tbl_test.Month<br />FROM tbl_test<br />GROUP BY tbl_test.Location, tbl_test.Year, tbl_test.Month<br />PIVOT tbl_test.Type;</p>
<p>The second query uses qry_test_part1 as it&#39;s source table.</p>
<p>SELECT qry_test_part1.Location, qry_test_part1.Year, qry_test_part1.Month, qry_test_part1.E, qry_test_part1.R, [R]-[E] AS [P+L]<br />FROM qry_test_part1<br />GROUP BY qry_test_part1.Location, qry_test_part1.Year, qry_test_part1.Month, qry_test_part1.E, qry_test_part1.R, [R]-[E];</p>
<p>It is this second query that you need to use pivottable view and choose the fields as I explained in my last comments.</p>
<p>You will find this query provides everything you needed, where each new month and location added will automatically show in the query without any further queries needing to be created, along with the year.</p>
<p>Regards</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: a.p.r. pillai</title>
		<link>http://msaccesstips.com/2009/11/ms-access-and-data-processing-2/comment-page-1/#comment-10</link>
		<dc:creator>a.p.r. pillai</dc:creator>
		<pubDate>Mon, 23 Nov 2009 23:24:58 +0000</pubDate>
		<guid isPermaLink="false">http://msaccesstips.com/?p=31#comment-10</guid>
		<description>Can you please present your solution in complete form with SQL Strings of both Queries exactly the same way as you have explained above. The result should match the sample image (2nd image from top on this page) given above. &lt;br /&gt;&lt;br /&gt;The example image that I have presented in the earlier Article as a Question (2nd image from top on this page) needs only two Queries to arrive at that result and I have presented the complete SQL strings of both Queries (&lt;b&gt;Method2_1&lt;/b&gt; and &lt;b&gt;Method2_2&lt;/b&gt;) on this page  too.&lt;br /&gt;&lt;br /&gt;What is explained and presented further on is how we can refine the procedure to automate and prepare the result in Report form without modifying the Queries every time.&lt;br /&gt;&lt;br /&gt;Regards,</description>
		<content:encoded><![CDATA[<p>Can you please present your solution in complete form with SQL Strings of both Queries exactly the same way as you have explained above. The result should match the sample image (2nd image from top on this page) given above. </p>
<p>The example image that I have presented in the earlier Article as a Question (2nd image from top on this page) needs only two Queries to arrive at that result and I have presented the complete SQL strings of both Queries (<b>Method2_1</b> and <b>Method2_2</b>) on this page  too.</p>
<p>What is explained and presented further on is how we can refine the procedure to automate and prepare the result in Report form without modifying the Queries every time.</p>
<p>Regards,</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://msaccesstips.com/2009/11/ms-access-and-data-processing-2/comment-page-1/#comment-11</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Mon, 23 Nov 2009 03:10:39 +0000</pubDate>
		<guid isPermaLink="false">http://msaccesstips.com/?p=31#comment-11</guid>
		<description>What happened to only needing two simple queries? Now I understand what you&#039;re trying to achieve I have a much simpler way...&lt;br /&gt;&lt;br /&gt;Use a select query but use the pivot table view.&lt;br /&gt;&lt;br /&gt;First we need to get the Expenses and Revenue transposed using a crosstab query, then add in the calculation for the P+L. In my previous comments I used the query &quot;qry_test_part1&quot;. This query transposed the E and R fields. &lt;br /&gt;&lt;br /&gt;In the final query we add the P+L fields by subtracting the Expenses from the Revenue fields. Let&#039;s call this qry_test_part2. The SQL for qry_test_part2 is as follows:&lt;br /&gt;SELECT qry_test_part1.Location, qry_test_part1.Year, qry_test_part1.Month, qry_test_part1.E, qry_test_part1.R, [R]-[E] AS [P+L]&lt;br /&gt;FROM qry_test_part1&lt;br /&gt;GROUP BY qry_test_part1.Location, qry_test_part1.Year, qry_test_part1.Month, qry_test_part1.E, qry_test_part1.R, [R]-[E];&lt;br /&gt;&lt;br /&gt;Now, in this query, change the view type to pivot table and drag the fields in as follows:&lt;br /&gt;Location as a Row field&lt;br /&gt;Month as a column field&lt;br /&gt;Year as a Filter field&lt;br /&gt;Expenses, Revenue and P+L fields as a total field&lt;br /&gt;&lt;br /&gt;You will now find the details laid out exactly as you require. Simply add this query to a command button on click event in vba as follows:&lt;br /&gt;DoCmd.OpenQuery &quot;qry_test_part2&quot;, acViewPivotTable&lt;br /&gt;&lt;br /&gt;That&#039;s it, you will find each time a month is added to the table that it&#039;s added automatically. Once the year changes, the user needs to simply change the filter option for year.</description>
		<content:encoded><![CDATA[<p>What happened to only needing two simple queries? Now I understand what you&#39;re trying to achieve I have a much simpler way&#8230;</p>
<p>Use a select query but use the pivot table view.</p>
<p>First we need to get the Expenses and Revenue transposed using a crosstab query, then add in the calculation for the P+L. In my previous comments I used the query &quot;qry_test_part1&quot;. This query transposed the E and R fields. </p>
<p>In the final query we add the P+L fields by subtracting the Expenses from the Revenue fields. Let&#39;s call this qry_test_part2. The SQL for qry_test_part2 is as follows:<br />SELECT qry_test_part1.Location, qry_test_part1.Year, qry_test_part1.Month, qry_test_part1.E, qry_test_part1.R, [R]-[E] AS [P+L]<br />FROM qry_test_part1<br />GROUP BY qry_test_part1.Location, qry_test_part1.Year, qry_test_part1.Month, qry_test_part1.E, qry_test_part1.R, [R]-[E];</p>
<p>Now, in this query, change the view type to pivot table and drag the fields in as follows:<br />Location as a Row field<br />Month as a column field<br />Year as a Filter field<br />Expenses, Revenue and P+L fields as a total field</p>
<p>You will now find the details laid out exactly as you require. Simply add this query to a command button on click event in vba as follows:<br />DoCmd.OpenQuery &quot;qry_test_part2&quot;, acViewPivotTable</p>
<p>That&#39;s it, you will find each time a month is added to the table that it&#39;s added automatically. Once the year changes, the user needs to simply change the filter option for year.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

