All,
I have a select query:
SELECT RECTRANS.ContractNumber, Max(RECTRANS.TransactionDate) AS MaxOfTransactionDate, DateAdd('yyyy',7,Max([RECTRANS].[TransactionDate])) AS Expr1
FROM RECTRANS
GROUP BY RECTRANS.ContractNumber
HAVING (((DateAdd('yyyy',7,Max([RECTRANS].[TransactionDate])))<Now()));
It will select and display the contacts with a certain criteria, being the last date of each contract + 7 years, as you can see above.
When this query gets run, it displays all the contracts in a table. I tried changing this to a Delete query, but when I try to run it, I get a "cant have aggregate function in WHERE clause"
Would it be possible to use another type of query that would move the data into another table? cause then it would remove it from the users view, and each time the query got run, it would delete the previous table anyway.
Any ideas? I have been working on this for days now and I don't seem to be moving..
Luke-
I have a select query:
SELECT RECTRANS.ContractNumber, Max(RECTRANS.TransactionDate) AS MaxOfTransactionDate, DateAdd('yyyy',7,Max([RECTRANS].[TransactionDate])) AS Expr1
FROM RECTRANS
GROUP BY RECTRANS.ContractNumber
HAVING (((DateAdd('yyyy',7,Max([RECTRANS].[TransactionDate])))<Now()));
It will select and display the contacts with a certain criteria, being the last date of each contract + 7 years, as you can see above.
When this query gets run, it displays all the contracts in a table. I tried changing this to a Delete query, but when I try to run it, I get a "cant have aggregate function in WHERE clause"
Would it be possible to use another type of query that would move the data into another table? cause then it would remove it from the users view, and each time the query got run, it would delete the previous table anyway.
Any ideas? I have been working on this for days now and I don't seem to be moving..
Luke-