It's me again. Stuck on yet another part I can't seem to figure out the best way to accomplish without multiple steps.
A bit of background -
We run a Work Order Accuracy report. It outputs to Excel format. Contains account number, scheduled date, issue, and sales id. When the report it run it pulls data from the day prior.
I turn around and import this data into an Access table and add a STATUS field (default value of NEW). Agents then use a form to work the records and correct issues. Upon clicking the 'Complete' button on the form, it updates the table and sets the record's STATUS to COMPLETED.
The next day, the report is run again. Due to lag times between the time the order is completed in our database and the time that our IS department updates the report server...we sometimes end up with records that were already completed on the next day's report.
What I'm trying to do is create some form of query that will look at tbl_woa and search for duplicate records based on the following:
Account number
Scheduled date
Sales ID
STATUS
Basically I want it to go 'Ok, here are two records that match account number, schedule date, and sales id. But the status for one says NEW. I need to delete that record.'
I can't figure out a way to do this with queries or the RunSQL command. Any suggestions?
A bit of background -
We run a Work Order Accuracy report. It outputs to Excel format. Contains account number, scheduled date, issue, and sales id. When the report it run it pulls data from the day prior.
I turn around and import this data into an Access table and add a STATUS field (default value of NEW). Agents then use a form to work the records and correct issues. Upon clicking the 'Complete' button on the form, it updates the table and sets the record's STATUS to COMPLETED.
The next day, the report is run again. Due to lag times between the time the order is completed in our database and the time that our IS department updates the report server...we sometimes end up with records that were already completed on the next day's report.
What I'm trying to do is create some form of query that will look at tbl_woa and search for duplicate records based on the following:
Account number
Scheduled date
Sales ID
STATUS
Basically I want it to go 'Ok, here are two records that match account number, schedule date, and sales id. But the status for one says NEW. I need to delete that record.'
I can't figure out a way to do this with queries or the RunSQL command. Any suggestions?