AfterUpdate of form not firing in a Project 
Author Message
 AfterUpdate of form not firing in a Project

I have a project (Acc2000) linked to a SQL server back end.

In a subform when moving to another record after a new record is added,
or after shift-enter or menu:Record, Save Record, neither AfterUpdate
nor AfterInsert fires.

Has anyone else seen this phenomenon?  Workaround?

TIA.

Phil

PS I'd appreciate an answer by email as well as to the group

  ttgservices.vcf
< 1K Download


Sun, 09 Mar 2003 03:00:00 GMT  
 AfterUpdate of form not firing in a Project

I found a message with the subject of "code in open/load event won't
execute" from 8/9/00 experiencing problems with update and load events not
executing.  Don't know if this is a similar problem you're having.  I've had
similar problems but have not found anything else in the newsgroup
concerning it.  In order to trace the problem, I used breakpoints at the
beginning of the event and they never occured.  What I have observed
happenning is that the event of the control (like AfterUpdate) is no longer
attached to the control.  If you look at the properties list of the control,
the event is blank, although it still exists in the code.  It's a relative
simple procedure to set the property back to "event procedure" if all you
have are a few event procedures.  But, if you have many, it's cumbersome to
make sure that no event becomes unattached.  It's also embarassing to
install new updates for a user, and then find the some parts of the code you
spent much time testing is no longer active!

Another way that I found to get the event "re-attached" is to put a space
(modify the line) on the end of the procedure line, such as in Private Sub
Text0_AfterUpdate() .  I have went so far as to create a macro that moves to
each procedure line, go to the end if it, and put a space.  Each time I make
changes to the form, I execute the macro as part of finishing the code
(compile and save, test, compact).

It's worked in the past.  However, now I have a situation where it works
until I save and close the form, but when I re-open it, the event is no
longer attached.  I would like to hear some comments on this issue, if it's
something we aren't doing correctly, if it's a known bug, and if there is a
surefire way of making sure everything is attached.

I have compacted the database.  I am using Access 97, SR2 (as near as I can
tell - that is, certain way of updating the patches doesn't put the SR2 in
the "about" page)

Thanks,

Duane


Quote:
> I have a project (Acc2000) linked to a SQL server back end.

> In a subform when moving to another record after a new record is added,
> or after shift-enter or menu:Record, Save Record, neither AfterUpdate
> nor AfterInsert fires.

> Has anyone else seen this phenomenon?  Workaround?

> TIA.

> Phil

> PS I'd appreciate an answer by email as well as to the group




Sat, 15 Mar 2003 03:00:00 GMT  
 AfterUpdate of form not firing in a Project
Hi Duane
Its been a long time since I did any work with 97 but as I recall when ever
I created an event when I was in the code window I would have to go to the
form, report or controls property sheet and set the Event propety to [Event
Procedure] or the code in that event will not run.

Quote:

> I found a message with the subject of "code in open/load event won't
> execute" from 8/9/00 experiencing problems with update and load events not
> executing.  Don't know if this is a similar problem you're having.  I've
had
> similar problems but have not found anything else in the newsgroup
> concerning it.  In order to trace the problem, I used breakpoints at the
> beginning of the event and they never occured.  What I have observed
> happenning is that the event of the control (like AfterUpdate) is no
longer
> attached to the control.  If you look at the properties list of the
control,
> the event is blank, although it still exists in the code.  It's a relative
> simple procedure to set the property back to "event procedure" if all you
> have are a few event procedures.  But, if you have many, it's cumbersome
to
> make sure that no event becomes unattached.  It's also embarassing to
> install new updates for a user, and then find the some parts of the code
you
> spent much time testing is no longer active!

> Another way that I found to get the event "re-attached" is to put a space
> (modify the line) on the end of the procedure line, such as in Private Sub
> Text0_AfterUpdate() .  I have went so far as to create a macro that moves
to
> each procedure line, go to the end if it, and put a space.  Each time I
make
> changes to the form, I execute the macro as part of finishing the code
> (compile and save, test, compact).

> It's worked in the past.  However, now I have a situation where it works
> until I save and close the form, but when I re-open it, the event is no
> longer attached.  I would like to hear some comments on this issue, if
it's
> something we aren't doing correctly, if it's a known bug, and if there is
a
> surefire way of making sure everything is attached.

> I have compacted the database.  I am using Access 97, SR2 (as near as I
can
> tell - that is, certain way of updating the patches doesn't put the SR2 in
> the "about" page)

> Thanks,

> Duane



> > I have a project (Acc2000) linked to a SQL server back end.

> > In a subform when moving to another record after a new record is added,
> > or after shift-enter or menu:Record, Save Record, neither AfterUpdate
> > nor AfterInsert fires.

> > Has anyone else seen this phenomenon?  Workaround?

> > TIA.

> > Phil

> > PS I'd appreciate an answer by email as well as to the group




Sun, 16 Mar 2003 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. AfterUpdate of form not firing in a Project

2. Form not firing AfterUpdate

3. AfterUpdate and LostFocus Events do not fire

4. Listbox - nav to rec by keystroke does not fire AfterUpdate

5. Listbox - nav to rec by keystroke does not fire AfterUpdate

6. Listbox - nav to rec by Alpha does not fire AfterUpdate

7. Listbox - nav to rec by keystroke does not fire AfterUpdate

8. Modal Form: Form Load, Form Open, Form Activate events do not Fire

9. AfterUpdate on Textbox fires more than once.

10. Firing AfterUpdate Event


 
Powered by phpBB® Forum Software © phpBB Group