There is a delete query that currently ask the user to input the Start and End dates for dates to be deleted.
In an attempt to update the database a new table DSRDATES has been added that has the fields Monday, Tuesday, etc with the field values being the actual dates (Update weekly)
What is needed is for the delete query to base its record deletion off of the current date or now() and what vaules are in the DSRDATES
Essentially,
iif(now()=[Tuesday]or now()=[Wednesday],[Monday],between [Monday] and now()-2))
Which would ultimately tell the query that if it is ran on Tuesday or Wednesday, delete all records with Monday's date, otherwise delete all records that have a date range between Monday's date and the day before yesterday.
I.E. if ran on Friday, all records with a date range between Monday and Wednesday would be deleted.
Thank you for any and all assistance.
In an attempt to update the database a new table DSRDATES has been added that has the fields Monday, Tuesday, etc with the field values being the actual dates (Update weekly)
What is needed is for the delete query to base its record deletion off of the current date or now() and what vaules are in the DSRDATES
Essentially,
iif(now()=[Tuesday]or now()=[Wednesday],[Monday],between [Monday] and now()-2))
Which would ultimately tell the query that if it is ran on Tuesday or Wednesday, delete all records with Monday's date, otherwise delete all records that have a date range between Monday's date and the day before yesterday.
I.E. if ran on Friday, all records with a date range between Monday and Wednesday would be deleted.
Thank you for any and all assistance.