How to make Crosstab query

G

ghost

Greeting,

I have 2 tables, one for sales, one for customers, and one for revenueitems.
Sales table has the following fields:
RevenueitmesId
Customerid
Price
Date

Customers table has the following fields:

CustomerID(primary key)
Name

Revenueitems table has the following fields:

RevenueitemsID(primary key)
Description
Price

I have about 10 items in the revenueitmes table and I generate daily report
abut sales. What I want to do is making as the following report:

CustomerID Name item1 item2 item3…. Item10 totalprice

1 John 3 0 0 3 100
2 Jakc 0 2 4 3 300
So on

How to make that please?
 
A

Arvin Meyer [MVP]

The easiest way is to start the CrossTab query wizard. From the query
window, click new, then Cross Tab Query. Add the tables and fields you
require. If you don't get your expected results the first time, try again.
 
T

Tom Wickerath

Try practicing a bit first, using the Northwind sample database:

Crosstab Queries
http://www.access.qbuilt.com/html/crosstab_queries.html

By the way, you have two field names, Name and Date, which are considered
reserved words in Access. It is best to avoid the use of any reserved words
for things that you assign a name to in Access.

Problem names and reserved words in Access
http://allenbrowne.com/AppIssueBadWord.html


Tom Wickerath
Microsoft Access MVP
http://www.accessmvp.com/TWickerath/
http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top