If you want a flag based on activity status, why not just use conditional formatting in the report or form? Set the textbox background to yellow if due within 2 days and red if it's past due - or something like that. No code, no query calculations required. If you're only interested in the project status it will be more complicated because you'll have to get the Max of activity due date and decide how to flag the project status based on that. IMO, the former is not only far easier, it makes it obvious as to which activities are responsible for any warning you might raise.
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.