I am not sure what you want here.
It looks like you are opening a form based ona query where the [Processed] field = No (checkbox).
Then the user puts a check in the [Processed] check box.
Then when the form is closed (On Close event) an email should be triggered emailing someone that records have been changed.
I am not sure about the last question. What is your issue here? If the query only returns [Processed] = No, then you can't use those results.
I would suggest opening the query, and copying the PK's into an array. The PKs in the array all = [Processed] = No. When the form closes, open a recordset on your queried table and, using one connection, but many recordsets, open a query on the main table one PK at a time and check to see if [Processed] now = Yes. If so, package information in a variable for later use in the email. Once the record checking is done, then send the email.
I am sure there are more elegant ways of doing this. So let's see a post so I can keep learning.
Does this help?
mmcdonal
|