473,324 Members | 2,248 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Regarding Crosstab Query

Hello everyone

My problem is i am using a crosstab query in access,
here is my scenario
i am letting user to enter a date and the output should be the successive 3 months amount. say if i enter 4/1/07 then i should get
AprAmt MayAmt JuneAmt
------------------------------------------------
instead i am getting output as

JanAmt FebAmt MarAmt AprAmt MayAmt JunAmt .......DecAmt
----------------------------------------------------------------------------------------------------

How can i avoid the empty columns which a user dont care about.
(I am using the Crosstab query)
Oct 26 '07 #1
3 1257
Jim Doherty
897 Expert 512MB
Hello everyone

My problem is i am using a crosstab query in access,
here is my scenario
i am letting user to enter a date and the output should be the successive 3 months amount. say if i enter 4/1/07 then i should get
AprAmt MayAmt JuneAmt
------------------------------------------------
instead i am getting output as

JanAmt FebAmt MarAmt AprAmt MayAmt JunAmt .......DecAmt
----------------------------------------------------------------------------------------------------

How can i avoid the empty columns which a user dont care about.
(I am using the Crosstab query)

Checkout the 'column headings' feature of crosstab queries right click in the query grid or view properties and enter the headings you want Access help documents it

Jim
Oct 26 '07 #2
Checkout the 'column headings' feature of crosstab queries right click in the query grid or view properties and enter the headings you want Access help documents it

Jim
Hi Jim

My problem is not about naming column headings, i want to display the columns only what the user(suppose the user entered 4/1/07 i need to get april,may and June amount or if the user enters 6/1/07 i need to get only june.july and august months amount but now what i am getting is; if entered date is 4/1/07 april,may and june but i am also getting the other months which are empty so i dont want the rest of months to be displayed) wants, i am using column heading format as dateformat([date],"mmm")
Oct 26 '07 #3
Jim Doherty
897 Expert 512MB
Hi Jim

My problem is not about naming column headings, i want to display the columns only what the user(suppose the user entered 4/1/07 i need to get april,may and June amount or if the user enters 6/1/07 i need to get only june.july and august months amount but now what i am getting is; if entered date is 4/1/07 april,may and june but i am also getting the other months which are empty so i dont want the rest of months to be displayed) wants, i am using column heading format as dateformat([date],"mmm")


Post the SQL of your crosstab please.

What I am looking for is for you to have something like this in the Pivot clause of your SQL (which I was rather hoping you would give you what you required when I pointed you towards column headings in query properties where you in effect 'Fix' them in the query grid thus returning only the columns that you require)

IN('Apr','May','Jun')

Regards

Jim
Oct 26 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Nathan Bloomfield | last post by:
Does anyone know if there is any documentation which relates to Access2k + ? or can anyone help adjust the code? I am having trouble converting the DAO references. TITLE :INF: How to...
2
by: Sherman H. | last post by:
I have a few questions for crosstab and popup form questions: 1. I created a crosstab as follows: IT Financial Operation John 21 22 ...
4
by: Judy | last post by:
I'm using Access 2003 and was wondering if it is possible to have a paramater selection within a crosstab query so that I wouldn't need to build a new table. I have a select query that I'm using...
7
by: newguy | last post by:
I am trying to get the totals of a table by client by type of income. This query will get what I am looking for with each unique combination as a row: SELECT Sales.Client, BillCode.Type,...
8
by: Penny | last post by:
(Access 2003 Multiuser Split DB, Windows XP Pro) Hi All, I would really appreciate just some basic tips on how to make a Crosstab Form based on a Crosstab Query. The query always has the same...
14
by: Tina | last post by:
My employer tracks productivity/performance of clinicians (how much they bill) each week, its averages for the month, and the 6 months. These averages are compared to their expected productivity....
27
by: Bob | last post by:
running access 2k; mdb w/ linked tables to another mdb (front/back-end); trying to run a query that updates a table FROM information from a crosstab query. I AM NOTT trying to update the...
4
by: m.wanstall | last post by:
I have a crosstab query that compiles data for Months of the year. I have a stacked select query on top of that crosstab query that uses the latest 2 months data and exports it to a fixed length...
4
by: mattlightbourn | last post by:
Hi all, I have a problem which has been driving me nuts. Crosstab queries! I have a database witch a few different tables to do with garment manufacturing. I have a table for a client...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.