Hi, I have an existing query that uses two tables INVOICES AND CUSTOMERS ('acno' in CUSTOMERS and 'account' in INVOICES as the link) to give me a list of customers who have not ordered in the last 18 months
I use:
Expr1: Max([INVOICES]![INVOICE DATE])<=DateAdd("m",-18,Date()) with -1 as the criteria and
Archive with 0 as the criteria.
I then go through the CUSTOMERS table to manually tick the archive field.
Firstly, I would like to have an update query that will update the archive field from 0 to -1, but I am getting an error message "Operation must use an undateable query"
Once this is solved, I would like to incorporate this update query into an autoexec macro so it runs on 1st of each month with datepart("d",date()=1)
Having trawled the internet, it looks like SQL would be the best way but would need to know how I would set it out(self taught in Access so little knowledge in SQL) .
Any help in any of these stages would be gratefully appreciated.
I use:
Expr1: Max([INVOICES]![INVOICE DATE])<=DateAdd("m",-18,Date()) with -1 as the criteria and
Archive with 0 as the criteria.
I then go through the CUSTOMERS table to manually tick the archive field.
Firstly, I would like to have an update query that will update the archive field from 0 to -1, but I am getting an error message "Operation must use an undateable query"
Once this is solved, I would like to incorporate this update query into an autoexec macro so it runs on 1st of each month with datepart("d",date()=1)
Having trawled the internet, it looks like SQL would be the best way but would need to know how I would set it out(self taught in Access so little knowledge in SQL) .
Any help in any of these stages would be gratefully appreciated.
Last edited: