Ok, here's what I currently have: Weekly a report is generated from the database pulling from tblLog, tblProjectData and tblActivityManager to create a Weekly Activity Report (WAR). tblProjectData contains the constants and tblLog contains the daily/weekly entries. Currently I have a append query that combines certain fields in each table and appends it to another. A word MailMerge is then generated from that table.
While this works fine as it is, if an idividual has more than one log in their project, within the dates specified, a sperate record is created in tblWAR. The table and query structure as follows:
tblWAR:
ProjectSummary
CommentSummary
ActivityManager
ProjectNumber
tblProjectData: (I'm leaving out the fields that aren't used)
ProjectNumber
Title
Description
AmID
tblActivityManager: (Again leaving out fields not used)
Rank/Grade
Last
tblLog:
ID (autonumber)
ProjectNumber
Comments
Date
qryWAR: (Query that combines data)
What I would like is for each project you get one entry for ProjectSummary, CommentSummary and Name with all the Log entries for that project combined in the CommentSummary field. (I hope someone understood that, I can't think of any other way to put it...)
Thanks for the help in advance.
AtlasAF
USAF
While this works fine as it is, if an idividual has more than one log in their project, within the dates specified, a sperate record is created in tblWAR. The table and query structure as follows:
tblWAR:
ProjectSummary
CommentSummary
ActivityManager
ProjectNumber
tblProjectData: (I'm leaving out the fields that aren't used)
ProjectNumber
Title
Description
AmID
tblActivityManager: (Again leaving out fields not used)
Rank/Grade
Last
tblLog:
ID (autonumber)
ProjectNumber
Comments
Date
qryWAR: (Query that combines data)
Code:
INSERT INTO tblWAR ( ProjectSummary, CommentsSummary, Name, ProjectNumber )
SELECT [Title] & ". " & [Description] AS ProjectSummary, tblLog.Comments, [Rank/Grade] & " " & [Last] AS Name, tblProjectData.ProjectNumber
FROM (tblActivityManager INNER JOIN tblProjectData ON tblActivityManager.PriPMID = tblProjectData.PrimaryID) INNER JOIN tblLog ON tblProjectData.ProjectNumber = tblLog.ProjectNumber
WHERE (((tblActivityManager.Section) Like [Forms]![frmGenWAR]![cmbSection]+'*') AND ((tblLog.Date) Between [Forms]![frmGenWAR]![cmbBegin] And [Forms]![frmGenWAR]![cmbEnd]))
ORDER BY tblActivityManager.Section, tblActivityManager.Last, tblProjectData.ProjectNumber, tblLog.Date;
What I would like is for each project you get one entry for ProjectSummary, CommentSummary and Name with all the Log entries for that project combined in the CommentSummary field. (I hope someone understood that, I can't think of any other way to put it...)
Thanks for the help in advance.
AtlasAF
USAF