I have a subform which contains the line items for an order. In that subform, if certain line items are deleted, then other optional line items also need to be deleted if they exist. The delete is being done using DAO that runs on the Form/Delete event, and works in a straightforward manner, except it leaves a line of “deleted” fields on the continuous subform. To try to get rid of this, I put in code at the end of the delete event saying Me.Requery and got the runtime error message 2118 – “You must save the current field before you run the Requery action.” Specifying the full form and subform control name causes the same error message. I also tried using the DoCmd.Requery version and got a slightly different runtime error 2046 – “The command or action Requery isn’t available now.”
I’m sure I’ve done this before on subforms and had it work – can anybody shed some light on this? I’ve even wondered if it is a timing issue or race condition.