G
Guest
Hi my access friends - hope you all had a nice weekend! Anyway, now to work:
I have 2 queries relating to rents on properties. One shows those properties
where
the rent agreement period was <=date() [Query 1]
the other shows those where the rent agreement period is >=date() [Query 2]
However, results which are in query1 can also be in query 2 because although
a rent period may have ended a new one could have begun.
SOOO! What I'm after is those results which are in query 1 ONLY - ie, where
the rent period has ended (ie is <=date()) but for which no new period exists
(ie there is no >=date() periods.
I'm guessing I need to do a 3rd query, bringing in those 2 original queries,
linking them on a suitable field (say on property name), and then restricting
in some way such as "in query1 but not in query2".
However what is the correct syntax as I'm not getting the correct result. Or
do I need to append the results of the two queries to separate tables and
then do the 3rd query on those two tables?
TIA
I have 2 queries relating to rents on properties. One shows those properties
where
the rent agreement period was <=date() [Query 1]
the other shows those where the rent agreement period is >=date() [Query 2]
However, results which are in query1 can also be in query 2 because although
a rent period may have ended a new one could have begun.
SOOO! What I'm after is those results which are in query 1 ONLY - ie, where
the rent period has ended (ie is <=date()) but for which no new period exists
(ie there is no >=date() periods.
I'm guessing I need to do a 3rd query, bringing in those 2 original queries,
linking them on a suitable field (say on property name), and then restricting
in some way such as "in query1 but not in query2".
However what is the correct syntax as I'm not getting the correct result. Or
do I need to append the results of the two queries to separate tables and
then do the 3rd query on those two tables?
TIA