Event trigger missing

GaelicFatboy

Registered User.
Local time
Today, 02:46
Joined
Apr 17, 2007
Messages
100
Hello,

I'm looking for a spot of advice about event calls.

I have a form with a datasheet containing three fields, and after an update I have a few lines of code to check what the change was in an "AfterUpdate" sub. The problem is, after the event trigger, which is in the form's event list, has been running smoothly for some time it has now stopped; upon inspection of the form this "AfterUpdate" event trigger has disappeared from the form's event list. Does anyone know what could cause this? I did have Access crash on me twice over the past week or so following some Windows 10 updates.

As a work around, is it normal practice to have some code in an "OnLoad" sub to set the event trigger properties as a form or report is loaded, and how would I check if the "OnLoad" event call is still present in order to set these properties?

Any light thrown on this problem will be very much appreciated.

Cheers

Denis
 
Hello,

I'm looking for a spot of advice about event calls.

I have a form with a datasheet containing three fields, and after an update I have a few lines of code to check what the change was in an "AfterUpdate" sub. The problem is, after the event trigger, which is in the form's event list, has been running smoothly for some time it has now stopped; upon inspection of the form this "AfterUpdate" event trigger has disappeared from the form's event list. Does anyone know what could cause this? I did have Access crash on me twice over the past week or so following some Windows 10 updates.

As a work around, is it normal practice to have some code in an "OnLoad" sub to set the event trigger properties as a form or report is loaded, and how would I check if the "OnLoad" event call is still present in order to set these properties?

Any light thrown on this problem will be very much appreciated.

Cheers

Denis

You've already explained the likely cause - highlighted above
Event code can become detached from form controls.
Its easy enough to relink them.
Access crashing for any reason can cause this e.g. faulty code used whilst developing

The golden rule should be SAVE before testing
If it crashes during testing, go back & check both the code & event handler
 
Cheers Colin,

I suspected as much, is there mileage in writing a bit of code in an "OnLoad" sub to set all the event properties for that form? I'm developing the code just now so it's prudent to cover this sooner rather than later.

Thanks for your help.

Cheers

Denis
 
I can't see the point in doing so but I'm willing to be proved wrong.

BTW I wish I could say I always follow my own golden rules but sometimes I forget. When I do so, it usually comes back to bite me later
 

Users who are viewing this thread

Back
Top Bottom