After_update problem

lana

Registered User.
Local time
Today, 09:04
Joined
Feb 10, 2010
Messages
92
Hi there,


I would appreciate if someone could help me with this problem.


I have a sub-form on a form. In this sub form data must be entered.

I need to execute a code when each record is entered in the sub-form.


I wrote the code in the "After_Update" procedure of this sub-form.


BUT ---- it doesn't run . When I include a toggle (break point) in a line , then this procedure is executed correctly.????


Help is desperately needed, PLEASE.



Thanks
 
What's the code, and what's the purpose ?
 
The code does not matter. Whatever the code is, it doesn't go to the "After_Update" procedure.

The purpose is : when a line of record is entered, some fields must be updated in another table. The code works fine but works only when I add a break point and run it line by line.
Thanks
 
I suspect the code does matter, as it doesn't work as you expect.

Normally validation or triggered events are fired / checked in the BeforeUpdate event, as this is called before a record is saved.

The after update event on a record level is not terribly reliable from memory, you might be better to check if the record is dirty?
 
In addition to Pat's comments, I believe the Forms after update event will fire after any field is updated, you really need a complete record update to be processed I assume.
 
Thank you all.

I solved the problem with Me.refresh and also I changed the code procedure to a specific field "lost focus".
It works like a charm.
Cheers
 
Thank you all.

I solved the problem with Me.refresh and also I changed the code procedure to a specific field "lost focus".
It works like a charm.
Cheers

So now the code will fire every time a user tabs through that control, whether they updated the record or not. Are you sure that's what you want?
 

Users who are viewing this thread

Back
Top Bottom