Link to home
Create AccountLog in
Avatar of Davisro
DavisroFlag for United States of America

asked on

Crosstab Query has blank values in some columns even though data exists

Experts,  I have a production Access report that is missing data in some columns. The data source is a query that depends on a query that depend on a query etc. so the query chain is about eight queries deep.

One of the dependent queries in the chain is a Crosstab query that has five columns: Cols 2 and 5 display values but Cols 1,3 and 4 are blank. Yet, if I change this exact query in the GUI to a Select query, then all of the data is displayed. When I switch it back to Crosstab, the columns are blank again.

So for example, say i have the following data in a Select query
Rate      Year    Amount
5.OH1      2020      500
5.OH1      2021      500
5.OH1      2022      1200
5.OH1      2023      1500
5.OH1      2024      1700

In Crosstab form it displays as below and therefore does not pass the values in the blank columns to the next query in the chain
Rate      2020   2021   2022   2023   2024
5.OH1                  500                             1700

Any idea why this is happenning and how I can fix it?

Thanks
SOLUTION
Avatar of John Tsioumpris
John Tsioumpris
Flag of Greece image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
ASKER CERTIFIED SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Avatar of Davisro

ASKER

Most bizarre solution. I created a test database and copied the effected records into the new tables and recreated the crosstab query. Same issue.
I noticed that a joined table had a lengthy report name (25 words) description in a text field. So i deleted the description text and the crosstab query then produced the missing values.
Very strange
OK. Thanks for the feedback.