?
Solved

cross tab in vb.net on an access database

Posted on 2013-11-21
1
Medium Priority
?
702 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 85

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 2000 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

CHALLENGE LAB: Troubleshooting Connectivity Issues

Goal: Fix the connectivity issue in the lab's AWS environment so that you can SSH into the provided EC2 instance.  

Question has a verified solution.

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

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
Suggested Courses

718 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