Could you elaborate on what specifically makes your form unclear, forcing you to clear it? Is it based on a temporary table, or does it hold data in memory?
The form is not based on temp table or memory. It's based on a table. My terminology may be wrong when I used "Clear".
When a form with "Data Entry" set to yes is opened, the recordsetclone.recordcount is equal to zero. When we add records, the recordcount is changed to 1->2->3->4->
By "clearing recordsetclone", I meant set the recordsetClone to nothing, or setting its recordcount to zero. Or as I explained in #1, make the form exactly like it's opened.
Can you elaborate on why flagging a record as emailed wouldn't be a better fit?
The records are flagged as Emailed. (with a datatime field and UserFK field in a junction table)
But there are more IFs as I explained.
I'd appreciate if you have a better suggestion in the following situation.
User starts entering data.
She saves 5 records for two suppliers, clicks "Send Mail". Two mails are sent to suppliers. (The records are flagged as mail sent)
She continues to add more records. She adds 3 more records for the same supplier (or another one). But doesn't click the "Send Mail". Because for some specific reasons, these records won't be emailed.
Still she continues to add more records. This time 10 records. These last 10 records should be emailed.
Now how does your program can recognize the second set of data (3 records that should not be mailed) with the last set of records (10 that should be mailed)?
13 records in recordsetclone exists that has not flagged as MailSent. But it's not clear which should be sent and which should not.
If we can "
clear" (again bad terminology) the form's recordset after the records that should not be mailed, the recordsetclone contains only the last 10 records.
That was my main question. How to make the form forget about the already entered data, and start fresh.
You want to store what has been sent in that hidden textbox? Why not keep a record of such an important thing as an interaction with a supplier?
If I was successful to explain my situation above, I think this is already answered. The interaction is saved and the record is set as emailed. The problem is not all records need to be emailed.
As I said, there are a lot more of conditions and IFs that we're facing. And it's really hard to explain all. I hope the above, at least shows a part of it.
Thanks for jumping in. I really appreciate your help, and am open to any kind of suggestion.