Solved

cross tab in vb.net on an access database

Posted on 2013-11-21
1
622 Views
Last Modified: 2013-12-10
I want to obtain a cross tab in vb.net on an access database.

I have got this from the internet

I don't understand how it woks.

Help

TRANSFORM Sum(IIf([FieldName]="Qty",[Quantity],[Quantity]*[Order Details]![UnitPrice])) AS TheValue
 SELECT Products.ProductName
 FROM tblXtabColumns, Products INNER JOIN (Orders INNER JOIN [Order Details]
 ON Orders.OrderID = [Order Details].OrderID) ON Products.ProductID = [Order Details].ProductID
 WHERE (Orders.OrderDate Between #1/1/1998# And #3/31/1998#)
 GROUP BY Products.ProductName
 PIVOT [FieldName] & Month([OrderDate]);
0
Comment
Question by:Anthony Matovu
1 Comment
 
LVL 84

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 500 total points
ID: 39667200
Transform creates a crosstab query, but it's difficult to understand the syntax (at least for me). If you have a copy of Access, then you can create a new query and switch to SQL view, and then copy/paste that into the query window. Assuming your table structure matches what the query expects, you'll be able to work with the query to get things right.

Transform article on MSDN:
http://msdn.microsoft.com/en-us/library/office/bb208956%28v=office.12%29.aspx
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question