If I read your question correctly, you can put the following in the criteria for the date field:-
BETWEEN IIf(Month(Date())<8, DateSerial(Year(Date())-2,8,1), DateSerial(Year(Date())-1,8,1)) AND IIf(Month(Date())<8, DateSerial(Year(Date())-1,7,31), DateSerial(Year(Date()),7,31))
So when the...