In your working one you're effectively saying:
WHERE (((TBL_Sales.Sales_Order_Date)=42389))
When its true however the failing one would equate to
WHERE (((TBL_Sales.Sales_Order_Date)=(TBL_Sales.Sales_Order_Date) Between 42389 And 42390))
so you're saying WHERE Sales_Order_Date = Sales_Order_Date Between 42389 And 42390
not sure if this will work but try:
WHERE ((IIf(Weekday(Date())<6,(TBL_Sales.Sales_Order_Date) Between 42389 And 42390,(TBL_Sales.Sales_Order_Date) = 42390)))
(pretty sure Ive got the brackets wrong but you can see the gist of it.
Bookmarks