AfterUpdate not firing on subform

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a trainign database which is used in regional locations I am
attempting to program a process whereby all Additions, Edits and Deletions
are recorded and can then be sent to a central location for import.

I have added code to write an update table along with additions and
deletions and have added code to the AfterUpdate event to write the Edit. So
far so good however 2 of my forms have subforms which need to be edited and
recorded. I placed the appropriate code (working everywhere else) into the
AfterUpdate event on the subform. Problem is that the subform AfterUpdate
event doesn't appear to be firing when I make a change to a record on the
subform.

I was under the impression that AfterUpdate fires everytime a record is
changed.
Help needed and appreciated.

Teewan
 
Teewan said:
I have a trainign database which is used in regional locations I am
attempting to program a process whereby all Additions, Edits and
Deletions are recorded and can then be sent to a central location for
import.

I have added code to write an update table along with additions and
deletions and have added code to the AfterUpdate event to write the
Edit. So far so good however 2 of my forms have subforms which need
to be edited and recorded. I placed the appropriate code (working
everywhere else) into the AfterUpdate event on the subform. Problem
is that the subform AfterUpdate event doesn't appear to be firing
when I make a change to a record on the subform.

I was under the impression that AfterUpdate fires everytime a record
is changed.

I've never known it to fail, Teewan. Are you sure that the subform's
record is actually being saved with out the event firing? The event
won't fire until the modified record is actually saved.
 
Can you post the relevant parts of your code?
Do you have error trapping in place?
How have you determined that the afterUpdate event is not firing? Have you
placed a message box in the after update event of the subforms to see if the
event fires?
 
Thanks guys,

Took a while to work it out but it seems the problem was that I was
attempting to reset the value of the DateUpdated field in the AfterUpdate
event and as it turns out that was not a good idea. Once I moved that line
of code to BeforeUpdate everything settled down nicely.

Cheers
 
Back
Top