Hello,
I have a query that shows age ranges, e.g.:
0-17mo
18mo-3yrs
4-5yrs
6-10yrs
11yrs
I created a sort column (age1; age2; etc.) so they are returned in the correct order, and not:
0-17mo
11yrs
18mo-3yrs
etc.
I am setting this in the sort row of design view. It works fine when I run the query in datasheet view, but in pivot table and pivot chart views, it seems I must include the sort column in the chart. I wouldn't mind so much if I could hide it. Is there some SQL or VBA I can use? Or a simpler way?
Thanks - sorry if this has already been asked; I did search but didn't see anything.
Here is the SQL if that helps:
=======================
SELECT tblCohorts.CohortName, tblAgencies.AgencyName, tblGrantType.GrantType, tblPrograms.ProgName, tblDemogsAllYears1and2.Report, tblDemogsAllYears1and2.DemogType, tblDemogsAllYears1and2.Demog, tblDemogsAllYears1and2.ClientsServed, tblDemogsAllYears1and2.DemogSortOrder, tblPrograms.AllocationAmt, tblPrograms.ProgNo
FROM (tblGrantType INNER JOIN (tblCohorts INNER JOIN (tblAgencies INNER JOIN tblPrograms ON tblAgencies.AgencyNo = tblPrograms.AgencyNo) ON tblCohorts.CohortNo = tblPrograms.CohortNo) ON tblGrantType.ID = tblPrograms.ProgramType) INNER JOIN tblDemogsAllYears1and2 ON tblPrograms.ProgNo = tblDemogsAllYears1and2.ProgNo
ORDER BY tblAgencies.AgencyName, tblDemogsAllYears1and2.DemogSortOrder;
========================
I have a query that shows age ranges, e.g.:
0-17mo
18mo-3yrs
4-5yrs
6-10yrs
11yrs
I created a sort column (age1; age2; etc.) so they are returned in the correct order, and not:
0-17mo
11yrs
18mo-3yrs
etc.
I am setting this in the sort row of design view. It works fine when I run the query in datasheet view, but in pivot table and pivot chart views, it seems I must include the sort column in the chart. I wouldn't mind so much if I could hide it. Is there some SQL or VBA I can use? Or a simpler way?
Thanks - sorry if this has already been asked; I did search but didn't see anything.
Here is the SQL if that helps:
=======================
SELECT tblCohorts.CohortName, tblAgencies.AgencyName, tblGrantType.GrantType, tblPrograms.ProgName, tblDemogsAllYears1and2.Report, tblDemogsAllYears1and2.DemogType, tblDemogsAllYears1and2.Demog, tblDemogsAllYears1and2.ClientsServed, tblDemogsAllYears1and2.DemogSortOrder, tblPrograms.AllocationAmt, tblPrograms.ProgNo
FROM (tblGrantType INNER JOIN (tblCohorts INNER JOIN (tblAgencies INNER JOIN tblPrograms ON tblAgencies.AgencyNo = tblPrograms.AgencyNo) ON tblCohorts.CohortNo = tblPrograms.CohortNo) ON tblGrantType.ID = tblPrograms.ProgramType) INNER JOIN tblDemogsAllYears1and2 ON tblPrograms.ProgNo = tblDemogsAllYears1and2.ProgNo
ORDER BY tblAgencies.AgencyName, tblDemogsAllYears1and2.DemogSortOrder;
========================