I have an Access table recording some Production data.
There're two shifts:
Day Shift (from morning 7am to 7pm)
Night Shift (from evening 7pm to 7am)
When cross month, for example, ID 9 is belong to Sep,2018. ID 71 is belong to Oct,2018.
-------- ---------- -------------------------------
ID Pieces dtDatetime
8 559 9/30/2018 6:50:00 PM
9 581 10/1/2018 6:50:00 AM
10 524 10/1/2018 6:50:00 PM
11 596 10/2/2018 6:50:00 AM
10 395 10/2/2018 6:50:00 PM
...
67 520 10/30/2018 6:50:00 AM
68 224 10/30/2018 6:50:00 PM
69 529 10/31/2018 6:50:00 AM
70 224 10/31/2018 6:50:00 PM
71 496 11/1/2018 6:50:00 AM
72 395 11/1/2018 6:50:00 PM
How to design query to get result into a UDT array for a specific month?Code:Private Type DailyProduce lYear As Long lMonth As Long lDay As Long lDayShiftVal As Long 'number of pieces produced on Day Shift lNightShiftVal As Long 'number of pieces produced on Night Shift End Type Dim tDailyProduce() As DailyProduce




Reply With Quote
