Capturing delete on Cascading Delete

D

Darrell

I apologize for double-posting this on both this group and the generic
forms group. I thought I was posting it here and realized after I had
posted it that I had posted to the wrong group. Everyone's indulgence is
appreciated.

I must say right up front that this seems like an absurdly easy task.
But, I'm thoroughly stymied by what seems like a gaping hole in Access's
events. I have a form and subform, and on the form I am calculating and
displaying the number of records on the subform which meet certain
criteria. I need this number to refresh whenever a record on the subform
is changed to meet the criteria, is inserted, or deleted.

The deletion will often occur when the user deletes the parent record on
the form, triggering Cascading Delete on the subform records. Here is
where the rub comes. I thought I would simply execute the simple
function I'm using to count the qualifying records on the
AfterDelConfirm event of either the form or the subform. BUT, neither
event fires when Cascading Deletes are in effect, leaving me with
nothing to "hook" my recount to. The Delete event is too early since the
records have not yet actually been deleted and... the AfterDelConfirm
event never fires!

Can anybody help?

p.s. I'm using Windows XP and Access 2003.

Thanks in advance,

Darrell
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top