BUG? Firing Order of Delete Related Events

A

Andrew McKendrick

Hi,

I'm running a copy of Access 2003 and I was doing some reading and testing
(breaks in code) on the firing order of the Delete, BeforeDelConfirm, and
AfterDelConfirm events. And to my suprise the results do not match what is
described in the Access Help.

Here are the results:

The first time a form opens and I initiate a delete (i.e. by pressing
CTRL+[-] or selecting the record and pressing DEL), the Delete event occurs,
but the BeforeDelConfirm and AfterDelConfirm events do not. I'm not even
prompted as to whether I want to delete the record.

When I try to delete a second record then the event sequence changes. First
the BeforeDelConfirm event occurs, followed by the AfterDelConfirm event, and
finally the Delete event.

From what I've gathered from the Help, the Delete event is supposed to occur
first, followed by the BeforeDelConfirm and AfterDelConfirm events. But as
you can see this is not the result that I'm getting.

Does anyone know if this is a know issue? Or, is fixed by a possible service
pack?

I can't find any related problems on the Internet.

Any help is greatly appreciated.

Thanks,

Andrew
 
A

Andrew McKendrick

Hi Allen,

The database I'm using is an MDB not an ADP. The article you sent me also
applies to Access 2000, not 2003.

However, it does illustrate this was a problem before... perhaps it's back
again?

Andrew

Allen Browne said:
From what you describe, it sounds like you are using an ADP.

See:
Order of Form Delete Events Differs in ADPs and MDBs
at:
http://support.microsoft.com/?id=234866

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Andrew McKendrick said:
I'm running a copy of Access 2003 and I was doing some reading and testing
(breaks in code) on the firing order of the Delete, BeforeDelConfirm, and
AfterDelConfirm events. And to my suprise the results do not match what is
described in the Access Help.

Here are the results:

The first time a form opens and I initiate a delete (i.e. by pressing
CTRL+[-] or selecting the record and pressing DEL), the Delete event
occurs,
but the BeforeDelConfirm and AfterDelConfirm events do not. I'm not even
prompted as to whether I want to delete the record.

When I try to delete a second record then the event sequence changes.
First
the BeforeDelConfirm event occurs, followed by the AfterDelConfirm event,
and
finally the Delete event.

From what I've gathered from the Help, the Delete event is supposed to
occur
first, followed by the BeforeDelConfirm and AfterDelConfirm events. But as
you can see this is not the result that I'm getting.

Does anyone know if this is a know issue? Or, is fixed by a possible
service
pack?

I can't find any related problems on the Internet.

Any help is greatly appreciated.

Thanks,

Andrew
 
A

Allen Browne

It was not a problem. ADPs are designed to work differently, and the same
behavior is present in A2002 and 2003.

Is it possible that you have linked to another Access database using an ODBC
connection or some such? I've never tried it, but you might see the same
behavior that way.

I've never seen the order of events fail in that predictable way for local
or linked Access (JET) tables, and we do use those events for transaction
logging, e.g.:
http://members.iinet.net.au/~allenbrowne/AppAudit.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Andrew McKendrick said:
Hi Allen,

The database I'm using is an MDB not an ADP. The article you sent me also
applies to Access 2000, not 2003.

However, it does illustrate this was a problem before... perhaps it's back
again?

Andrew

Allen Browne said:
From what you describe, it sounds like you are using an ADP.

See:
Order of Form Delete Events Differs in ADPs and MDBs
at:
http://support.microsoft.com/?id=234866

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Andrew McKendrick said:
I'm running a copy of Access 2003 and I was doing some reading and
testing
(breaks in code) on the firing order of the Delete, BeforeDelConfirm,
and
AfterDelConfirm events. And to my suprise the results do not match what
is
described in the Access Help.

Here are the results:

The first time a form opens and I initiate a delete (i.e. by pressing
CTRL+[-] or selecting the record and pressing DEL), the Delete event
occurs,
but the BeforeDelConfirm and AfterDelConfirm events do not. I'm not
even
prompted as to whether I want to delete the record.

When I try to delete a second record then the event sequence changes.
First
the BeforeDelConfirm event occurs, followed by the AfterDelConfirm
event,
and
finally the Delete event.

From what I've gathered from the Help, the Delete event is supposed to
occur
first, followed by the BeforeDelConfirm and AfterDelConfirm events. But
as
you can see this is not the result that I'm getting.

Does anyone know if this is a know issue? Or, is fixed by a possible
service
pack?

I can't find any related problems on the Internet.

Any help is greatly appreciated.

Thanks,

Andrew
 
A

Andrew McKendrick

Hi Allen,

The front-end application links to a background Access database. There is no
ODBC involved. In addition, I created a local table and form temporarily to
test it and the same behaviour is present.

I used the delete events frequently in Access 2002 and I also had no
problems before. But for some reason this Access 2003 is behaving differently
and I'd really like to know why.

Thanks for your help, maybe someone else can shed some light on this.

Andrew

Allen Browne said:
It was not a problem. ADPs are designed to work differently, and the same
behavior is present in A2002 and 2003.

Is it possible that you have linked to another Access database using an ODBC
connection or some such? I've never tried it, but you might see the same
behavior that way.

I've never seen the order of events fail in that predictable way for local
or linked Access (JET) tables, and we do use those events for transaction
logging, e.g.:
http://members.iinet.net.au/~allenbrowne/AppAudit.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Andrew McKendrick said:
Hi Allen,

The database I'm using is an MDB not an ADP. The article you sent me also
applies to Access 2000, not 2003.

However, it does illustrate this was a problem before... perhaps it's back
again?

Andrew

Allen Browne said:
From what you describe, it sounds like you are using an ADP.

See:
Order of Form Delete Events Differs in ADPs and MDBs
at:
http://support.microsoft.com/?id=234866

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

"Andrew McKendrick" <andrmck[at]yahoo.com> wrote in message

I'm running a copy of Access 2003 and I was doing some reading and
testing
(breaks in code) on the firing order of the Delete, BeforeDelConfirm,
and
AfterDelConfirm events. And to my suprise the results do not match what
is
described in the Access Help.

Here are the results:

The first time a form opens and I initiate a delete (i.e. by pressing
CTRL+[-] or selecting the record and pressing DEL), the Delete event
occurs,
but the BeforeDelConfirm and AfterDelConfirm events do not. I'm not
even
prompted as to whether I want to delete the record.

When I try to delete a second record then the event sequence changes.
First
the BeforeDelConfirm event occurs, followed by the AfterDelConfirm
event,
and
finally the Delete event.

From what I've gathered from the Help, the Delete event is supposed to
occur
first, followed by the BeforeDelConfirm and AfterDelConfirm events. But
as
you can see this is not the result that I'm getting.

Does anyone know if this is a know issue? Or, is fixed by a possible
service
pack?

I can't find any related problems on the Internet.

Any help is greatly appreciated.

Thanks,

Andrew
 

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