After Update

  • Thread starter Thread starter Jacob
  • Start date Start date
J

Jacob

On my After Update on a form. I have it populate 2 fields showing who was in
there and what time the changes were made. The problem is, after the after
update fires, I can no longer navigate to the next record. It seems to lock
up. Is there a script that will allow me to continue. Here is the code I
used on my After Update...



Me.[Datemo] = Now()
Me.[Modifiedby] = user
 
Jacob said:
On my After Update on a form. I have it populate 2 fields showing who was in
there and what time the changes were made. The problem is, after the after
update fires, I can no longer navigate to the next record. It seems to lock
up. Is there a script that will allow me to continue. Here is the code I
used on my After Update...

Use BeforeUpdate.

Think about it. You are updating a record in the AfterUpdate event. Guess what? The
event has to fire again now because you made an update. The record is stuck in a
loop.
 
For time stamp and audit trail data, you should use BeforeUpdate Event. I
think you will create a non-terminating loop with AfterUpdate for this
(unless Access picks it up and I have seen cases where my logic was wrong
and Access picked it up).
 
Back
Top