This will work. I chose to call the columns
"Start" "End" "Minus30" and "Plus30"
1. Make a query in design view
2. Save it
3. Double click each of the four fields to a column in the query design grid to add them to the query.
4. In the 'field' cell of the next column, type the following expression:
Expr1: IIf(([Start]>=[Minus30]) And ([End]<=[Plus30]),"Within the range","Not within the range")
Note the unusual spelling of "If" - it has two i's then one f.
Second term is what's returned if the expression is true (I chose a text) and the third term is what's returned if the expression is false i.e. if the service dates are not within the other range.
|