D
Dick Minter
My form's record source is a query of selected records. As each record is
processed it is de-selected and the form is requeried (me.requery). I want
the form to close when the last record has been processed. I tried code on
the form's Current event:
If isnull(dlookup("[idfield]","[queryname]")) then
btnClose_click (includes the "docmd.close acform, me.name" statement)
end if
But I get an error: Close method cannot be executed while event is still
running.
Where else can I place the code? Or is there a better approach?
DM
processed it is de-selected and the form is requeried (me.requery). I want
the form to close when the last record has been processed. I tried code on
the form's Current event:
If isnull(dlookup("[idfield]","[queryname]")) then
btnClose_click (includes the "docmd.close acform, me.name" statement)
end if
But I get an error: Close method cannot be executed while event is still
running.
Where else can I place the code? Or is there a better approach?
DM