BeforeDelConfirm, AfterDelConfirm events not firing 
Author Message
 BeforeDelConfirm, AfterDelConfirm events not firing

I have a pretty standard form which shows the details of one record of a
table. It is opened from a second form which reviews all of the records of
the table using the following pretty standard code:

    strOpenArgs = "CREDIT"
    strDocName = "frmTimeSlipDetails"
    strLinkCriteria = "[TIME_SLIP_ID]=" & Me![TIME_SLIP_ID]
    DoCmd.OpenForm strDocName, , , strLinkCriteria, , , strOpenArgs

For some reason, when I press the DeleteRecord toolbar button, the
BeforeDelConfirm and AfterDelConfirm events are not firing, even though the
Delete event is firing as normal and the record is being deleted withough
warning.

The confirm delete option is checked and the same code is running other
similar forms in the same application.

Has anyone got any ideas why the events are not occuring as they should?

Best regards
Neil Sargent



Sun, 27 Jan 2002 03:00:00 GMT  
 BeforeDelConfirm, AfterDelConfirm events not firing
Go check your form's properties and check under events. Make sure your
BeforeDelConfirm and AfterDelConfirm events show "[Procedure]" or whatever
it's got to show in english to indicate there is a routine or function to be
executed for that event

--
HTH/EQTA
Mario Osorio
====================================================
You'll find good answers to common (and not so common) questions
and all kinds of interesting stuff at: http://home.att.net/~dashish
Ud. encontrar buenas respuestas a preguntas comunes (y no tan comunes)
y otras cosas interesantes en esta direccin: http://home.att.net/~dashish
====================================================
--



: I have a pretty standard form which shows the details of one record of a
: table. It is opened from a second form which reviews all of the records of
: the table using the following pretty standard code:
:
:     strOpenArgs = "CREDIT"
:     strDocName = "frmTimeSlipDetails"
:     strLinkCriteria = "[TIME_SLIP_ID]=" & Me![TIME_SLIP_ID]
:     DoCmd.OpenForm strDocName, , , strLinkCriteria, , , strOpenArgs
:
: For some reason, when I press the DeleteRecord toolbar button, the
: BeforeDelConfirm and AfterDelConfirm events are not firing, even though
the
: Delete event is firing as normal and the record is being deleted withough
: warning.
:
: The confirm delete option is checked and the same code is running other
: similar forms in the same application.
:
: Has anyone got any ideas why the events are not occuring as they should?
:
: Best regards
: Neil Sargent

:
:
:



Sun, 27 Jan 2002 03:00:00 GMT  
 BeforeDelConfirm, AfterDelConfirm events not firing
Thanks, but that isn't the problem here. I have msgbox calls en each of the
Delete, BeforeDelConfirm and AfterDelConfirm event procedures. They work
fine if I open the form from the database window. The events are only
failing to fire when the form is opened with a Where parameter in the
OpenForm method which specifies a single matching record.

Best Regards
Neil Sargent

Quote:

>Go check your form's properties and check under events. Make sure your
>BeforeDelConfirm and AfterDelConfirm events show "[Procedure]" or whatever
>it's got to show in english to indicate there is a routine or function to
be
>executed for that event

>--
>HTH/EQTA
>Mario Osorio
>====================================================
>You'll find good answers to common (and not so common) questions
>and all kinds of interesting stuff at: http://home.att.net/~dashish
>Ud. encontrar buenas respuestas a preguntas comunes (y no tan comunes)
>y otras cosas interesantes en esta direccin: http://home.att.net/~dashish
>====================================================



Sun, 27 Jan 2002 03:00:00 GMT  
 BeforeDelConfirm, AfterDelConfirm events not firing
I seem to recall being aggravated by this in the past.  If I remember right,
those events only fire if in your Options you have Confirm Document
Deletions checked.  This may not be your problem, but because of that I've
never used those events since you can't (or shouldn't) control a user's
personal settings.  :(

<<Kevin>>


Quote:
> Thanks, but that isn't the problem here. I have msgbox calls en each of
the
> Delete, BeforeDelConfirm and AfterDelConfirm event procedures. They work
> fine if I open the form from the database window. The events are only
> failing to fire when the form is opened with a Where parameter in the
> OpenForm method which specifies a single matching record.

> Best Regards
> Neil Sargent


> >Go check your form's properties and check under events. Make sure your
> >BeforeDelConfirm and AfterDelConfirm events show "[Procedure]" or
whatever
> >it's got to show in english to indicate there is a routine or function to
> be
> >executed for that event

> >--
> >HTH/EQTA
> >Mario Osorio
> >====================================================
> >You'll find good answers to common (and not so common) questions
> >and all kinds of interesting stuff at: http://home.att.net/~dashish
> >Ud. encontrar buenas respuestas a preguntas comunes (y no tan comunes)
> >y otras cosas interesantes en esta direccin:

http://home.att.net/~dashish

- Show quoted text -

Quote:
> >====================================================



Sun, 27 Jan 2002 03:00:00 GMT  
 BeforeDelConfirm, AfterDelConfirm events not firing
That' a very valid point. It isn't the problem in this case, but I hadn't
considered the risk of them being turned off by options.

What I have done in the interim is to set the forms AllowDeletions property
to False to switch off the DeleteRecord button on the standard toolbar and
menu, and provided a Delete command button which checks.

However, the engineer in me is still burning to know why the events weren't
firing....

Best Regards
Neil Sargent



Fri, 01 Feb 2002 03:00:00 GMT  
 BeforeDelConfirm, AfterDelConfirm events not firing
Check DoCmd.SetWarnings
Quote:

> That' a very valid point. It isn't the problem in this case, but I hadn't
> considered the risk of them being turned off by options.

> What I have done in the interim is to set the forms AllowDeletions property
> to False to switch off the DeleteRecord button on the standard toolbar and
> menu, and provided a Delete command button which checks.

> However, the engineer in me is still burning to know why the events weren't
> firing....

> Best Regards
> Neil Sargent




Sat, 02 Feb 2002 03:00:00 GMT  
 BeforeDelConfirm, AfterDelConfirm events not firing

Quote:

>Check DoCmd.SetWarnings

Thanks, but its not that either.


Sat, 02 Feb 2002 03:00:00 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. Access 97: OnDelete, BeforeDelConfirm, AfterDelConfirm

2. click event not firing if lost_focus is firing first

3. ReadProperties event and WriteProperties event are not firing

4. Terminate Event not Fired

5. Inspector_Close Event Not Firing

6. Outlook 2000 Add-in : Disconnect events do not fire

7. Event does not fire after showing a form

8. Form events not firing in public folder

9. Reply Inspector not firing terminate event???

10. CheckBox events not firing?

11. Click-Event does not fire

12. Events not firing under on Import...

 

 
Powered by phpBB® Forum Software