Specific Date Headers

  • Thread starter Thread starter cna48
  • Start date Start date
C

cna48

I have a report that is sorted by date. I have formatted the dates with a
"ww" format that groups and creates a header by the particular week number.
For every group or week number I would like to create a header that states
the week number and the date of the monday of that week.
Example:
Week 2
Data1 Data2 1/8/08
Data1 Data2 1/9/08

Should be:
Week 2 Beginning Monday 1/7/08
Data1 Data2 1/8/08
Data1 Data2 1/9/08

Any thoughts, ideas, or suggestions would be appreciated.
If the question is unclear, please let me know.
 
SELECT [Brochsteins Schedule].Detailer, [Brochsteins Schedule].PM,
[Brochsteins Schedule].[Drawing No], [Brochsteins Schedule].[Detail Hrs],
[Brochsteins Schedule].[Shop Hrs], [Brochsteins Schedule].[Inst Hrs],
[Brochsteins Schedule].TNM, [Brochsteins Schedule].Description, [Brochsteins
Schedule].[1st Sub], [Brochsteins Schedule].[1st Sub C], [Brochsteins
Schedule].[1st Ret], [Brochsteins Schedule].[1st Ret C], [Brochsteins
Schedule].[2nd Sub], [Brochsteins Schedule].[2nd Sub C], [Brochsteins
Schedule].[2nd Ret], [Brochsteins Schedule].[2nd Ret C], [Brochsteins
Schedule].[Field Dim], [Brochsteins Schedule].[Field Dim C], [Brochsteins
Schedule].[To S/B Date], [Brochsteins Schedule].[To S/B], [Brochsteins
Schedule].[To Shop Date], [Brochsteins Schedule].[To Shop], [Brochsteins
Schedule].[PM/Detail Notes], [Brochsteins Schedule].[Prod Date], [Brochsteins
Schedule].[Ship Date], [Brochsteins Schedule].Shipped, [Brochsteins
Schedule].Job, [Brochsteins Schedule].[Thru-Put], ([Prod Date]-[To Shop
Date])/7 AS [Cycle Time], [Brochsteins Schedule].Core, [Brochsteins
Schedule].[Core C], [Brochsteins Schedule].Ven, [Brochsteins Schedule].[Ven
C], [Brochsteins Schedule].Mach, [Brochsteins Schedule].[Mach C],
[Brochsteins Schedule].Cabinet, [Brochsteins Schedule].[Cab C], [Brochsteins
Schedule].Finish, [Brochsteins Schedule].[Finish C], [Brochsteins
Schedule].Upfit, [Brochsteins Schedule].[Upfit C], [Brochsteins
Schedule].Metal, [Brochsteins Schedule].[Metal C], [Brochsteins
Schedule].[Production Notes], [Brochsteins Schedule].[Thru-Put]
FROM [Brochsteins Schedule]
WHERE ((([Brochsteins Schedule].[Drawing No]) Like [Enter The Job #] & "*")
AND (([Brochsteins Schedule].Shipped)=False))
ORDER BY [Brochsteins Schedule].[Ship Date];
 
Try this ---
..... [Brochsteins Schedule].[Thru-Put], Format([Ship Date],"yyyy") &
Right(Format([Ship Date]," ww"),2) AS SortWeek, "Week " & Right(Format([Ship
Date]," ww"),2) & " Beginning " & Format([Ship Date]-Format([Ship
Date],"w")+2,"dddd m/d/yy") AS HeaderWeek
FROM [Brochsteins Schedule]
WHERE ((([Brochsteins Schedule].[Drawing No]) .......

--
KARL DEWEY
Build a little - Test a little


cna48 said:
SELECT [Brochsteins Schedule].Detailer, [Brochsteins Schedule].PM,
[Brochsteins Schedule].[Drawing No], [Brochsteins Schedule].[Detail Hrs],
[Brochsteins Schedule].[Shop Hrs], [Brochsteins Schedule].[Inst Hrs],
[Brochsteins Schedule].TNM, [Brochsteins Schedule].Description, [Brochsteins
Schedule].[1st Sub], [Brochsteins Schedule].[1st Sub C], [Brochsteins
Schedule].[1st Ret], [Brochsteins Schedule].[1st Ret C], [Brochsteins
Schedule].[2nd Sub], [Brochsteins Schedule].[2nd Sub C], [Brochsteins
Schedule].[2nd Ret], [Brochsteins Schedule].[2nd Ret C], [Brochsteins
Schedule].[Field Dim], [Brochsteins Schedule].[Field Dim C], [Brochsteins
Schedule].[To S/B Date], [Brochsteins Schedule].[To S/B], [Brochsteins
Schedule].[To Shop Date], [Brochsteins Schedule].[To Shop], [Brochsteins
Schedule].[PM/Detail Notes], [Brochsteins Schedule].[Prod Date], [Brochsteins
Schedule].[Ship Date], [Brochsteins Schedule].Shipped, [Brochsteins
Schedule].Job, [Brochsteins Schedule].[Thru-Put], ([Prod Date]-[To Shop
Date])/7 AS [Cycle Time], [Brochsteins Schedule].Core, [Brochsteins
Schedule].[Core C], [Brochsteins Schedule].Ven, [Brochsteins Schedule].[Ven
C], [Brochsteins Schedule].Mach, [Brochsteins Schedule].[Mach C],
[Brochsteins Schedule].Cabinet, [Brochsteins Schedule].[Cab C], [Brochsteins
Schedule].Finish, [Brochsteins Schedule].[Finish C], [Brochsteins
Schedule].Upfit, [Brochsteins Schedule].[Upfit C], [Brochsteins
Schedule].Metal, [Brochsteins Schedule].[Metal C], [Brochsteins
Schedule].[Production Notes], [Brochsteins Schedule].[Thru-Put]
FROM [Brochsteins Schedule]
WHERE ((([Brochsteins Schedule].[Drawing No]) Like [Enter The Job #] & "*")
AND (([Brochsteins Schedule].Shipped)=False))
ORDER BY [Brochsteins Schedule].[Ship Date];

KARL DEWEY said:
Post your SQL.
 
Back
Top