NauticalGent
Ignore List Poster Boy
- Local time
- Today, 18:35
- Joined
- Apr 27, 2015
- Messages
- 6,747
Hello again Access Apostles,
I have finally sucked it up and decided to take the plunge into cross-tab queries. I have avoided them because of the Excel-like nature to them and I have never had a need for them...until now.
After reading some threads here and watching some YouTube videos, I rolled up my sleeves and got to it.
The SQL code below is what get generated from the Design View screen capture.
TRANSFORM First(tblCORAudit.AuditStatusDate) AS FirstOfAuditStatusDate
SELECT tblCORAudit.SchedID
FROM tblCORAudit
GROUP BY tblCORAudit.SchedID
PIVOT tblCORAudit.AuditStatus;
It provides me with a 99% solution, which is more than acceptable. However, the finishing touch would be to sort the column headings differently.
The data in the tblCORAudit.AuditStatus comes from a table called tblStatus. It has a Primary field called "Rank" which is numeric.
As written the Column headings are alphabetically sorted by the actual status entered. What I would like is to sort the status entries by the numerical rank.
Again, thanks in advance and if I an not been clear enough, please let me know and I will make it clearer.
I have finally sucked it up and decided to take the plunge into cross-tab queries. I have avoided them because of the Excel-like nature to them and I have never had a need for them...until now.
After reading some threads here and watching some YouTube videos, I rolled up my sleeves and got to it.
The SQL code below is what get generated from the Design View screen capture.
TRANSFORM First(tblCORAudit.AuditStatusDate) AS FirstOfAuditStatusDate
SELECT tblCORAudit.SchedID
FROM tblCORAudit
GROUP BY tblCORAudit.SchedID
PIVOT tblCORAudit.AuditStatus;
It provides me with a 99% solution, which is more than acceptable. However, the finishing touch would be to sort the column headings differently.
The data in the tblCORAudit.AuditStatus comes from a table called tblStatus. It has a Primary field called "Rank" which is numeric.
As written the Column headings are alphabetically sorted by the actual status entered. What I would like is to sort the status entries by the numerical rank.
Again, thanks in advance and if I an not been clear enough, please let me know and I will make it clearer.