Hi Stewart,
Like I stated in the original post, it is looking for the previous month.
...
Unfortunately your original post was not expressed very well - hence clarification was required.
Consider - What does "the previous month" mean when there is no relative item? Prior to what?
I looked at your code to try and reverse engineer the question. This latest one seems to refer to two fields from the query, yet your original post referred to the Date() function. Consider how confusing this is for someone who can only understand what you need from what you say in your posts.
Anyway, assuming that the fields used in your latest post are what you need (you stated after all that this works) then your code would probably be something like :
- WorkedPrevMth: IIf((Month(qry_WorkedPrevMth_1.Date) - 1) = Month(qry_WorkedPrevMth_1.LastDate), 1, 0)
I assume that [qry_WorkedPrevMth_1] is one of the data sources in the query you're working with.