put this code into a module, or button OnClick event:
the code below uses a query qsItems2Ship of all available orders where [ShipBlock] = null
'then cycles thru the query, getting one 24 time block at a time, filling in the ShipBlock
Code:
Public Sub MakeShipBlocks()
Dim vStartDate, vEndDate
Dim lBlock As Long, lCnt As Long
Dim sSql As String
Const kQRY = "qsItems2Ship" 'this query gets all orders to ship in date order, with null SHIPBLOCK
docmd.Setwarnings = false
lBlock = 1
bMore = True
vStartDate = DMin("[OrderDate]", kQRY) 'get the 1st Timestamp of the orders
vEndDate = DateAdd("s", -1, DateAdd("h", 24, vStartDate)) 'get the end time of the 1st block
lCnt = DCount("*", kQRY)
While lCnt > 0
sSql = "UPDATE tOrders SET tOrders.ShipBlock = " & lBlock & " WHERE (((tOrders.OrderDate) Between #" & vStartDate & "# And #" & vEndDate & "#) AND ((tOrders.ShipBlock) Is Null));"
DoCmd.RunSQL sSql
lBlock = lBlock + 1
vStartDate = DateAdd("s", 1, vEndDate) 'get next 24hr time block
vEndDate = DateAdd("s", -1, DateAdd("h", 24, vStartDate))
lCnt = DCount("*", kQRY)
Wend
MsgBox "Done"
End Sub