Originally Posted by
June7
You can export the ProjectGroups temp table or the ProjectGroupsORDER query to Excel then do what you want to arrange/group/color/collapse rows. Writing code to manipulate Excel to that end is more than I want to tackle - you are on your own there.
As far as assigning a sort priority to records within each group, try this query statement:
SELECT ProjectGroups.GrpID, ProjectGroups.EmpCode, tblEmployee.EmpName, ProjectGroups.Project, ProjectGroups.Discipline, tblStaffingPlans.plans_week1
FROM tblEmployee INNER JOIN (tblStaffingPlans INNER JOIN ProjectGroups ON tblStaffingPlans.RecID = ProjectGroups.PlansRecID) ON tblEmployee.EmpCode = ProjectGroups.[EmpCode]
ORDER BY ProjectGroups.GrpID, ProjectGroups.EmpCode, IIf([GrpID] Like [ProjectGroups].[Project] & "*",0,1), IIf([GrpID] Like "*" & [ProjectGroups].[Discipline],0,1), ProjectGroups.Project, ProjectGroups.Discipline;
Unfortunately, the report is now broken. Still looking at but maybe moot since you didn't like the export result.