Quote:
Originally Posted by reidynem
Yes the ship date is the due date - I renamed the field.
What you said is exactly right - that is what I need!
|
Let's try to get the first question answered before we go on.
Note sure what you really are trying to do here:
Code:
( (dbo_RDR1.ShipDate)<Date()+(Month(Date()))
The above does not have anything really to do with what you need.
Here is how you do some date calculations:
The first day current month:
DateSerial(Year(Date()), Month(Date()), 1)
The last day of the current month:
DateSerial(Year(Date()), Month(Date()) + 1, 0)
You will uses there to get the desired date ranges.
To get the Ship dates in the current month you would use:
Code:
(dbo_RDR1.ShipDate) between DateSerial(Year(Date()), Month(Date()), 1) and DateSerial(Year(Date()), Month(Date()) + 1, 0)
To get the past due records you would use:
Code:
(dbo_RDR1.ShipDate) < DateSerial(Year(Date()), Month(Date()), 1)
If you combined the two together you would want records on or before then end of the current month.
So you would use this:
Code:
HAVING (((dbo_RDR1.OpenQty)<>0) AND ((dbo_RDR1.ShipDate)<(DateSerial(Year(Date()), Month(Date()) + 1, 0))));
I now see where you might have got the
Date()+(Month(Date()). Unfortunately that was not the correct calculation to get eh end of the current month.