Solved

cross tab in vb.net on an access database

Posted on 2013-11-21
1
574 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…

707 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now