I am trying to create a Gantt-style chart but I do not need to show several activities for a project like a regular Gantt chart. This will help program managers with assigning project managers to projects by showing a Gantt view of all the projects grouped by the resource name on the X axis. The project start and end dates will determine the width of the Gantt bars for each project.
I want the Gantt bars to be colored/outlined depending on if a project manager's project is overlapping with another. For example, Project A is from 4/9/2012-3/31/2015 and Project B is from 11/1/2013-9/30/2015. The Gantt bar for Project A would be outlined purple from 4/9/2012-11/1/2013 to show there are no other overlapping projects during that time. From 11/1/2013-9/30/2015, both project A and Project B would be outlined in red to show that the project manager is working on both projects. From 3/31/2015 - 9/30/2015, Project B would be outlined in purple because Project A has ended and Project B is now the only project the project manager is working on during that time.
For my tables I have:
- tblProject
- ProjectID
- ProjectName
- ProjectStartDate
- ProjectEndDate
- fkProgramManagerID
- tblResource
- ResourceID
- ResourceName
- tblProgramManager
- ProgramManagerID
- ProgramManagerName
- tblResourceProjects
- ResourceProjectID
- fkProjectID
- fkResourceID
I'm having trouble figuring out how to create the Gantt chart from here. I think I would need to use VBA to color code the Gantt bar but I'm not sure how to apply different colors based on if there's overlap with another project or not. I was thinking I'd need to create a table like tblDates with all the dates of every single day from 1/1/2012 all the way to 12/31/2017. Then I'd use a query or function to compare all the dates in the table to the project start and end dates and add all the dates between the start and end date to tblResourceProjectDates along with ResourceProjectID. Then I'd somehow compare the date and ResourceID for that record and see if there are other dates that have the same date and resourceID and maybe have a yes/no field for overlap and make it yes if there is an overlap and no if there isn't. Then I could apply the styling by VBA that way.
I manually created an example in Visio but I'd like to make this in Access so the Gantt is generated automatically after the user enters the Project and Resource information into a form.