Before Update Event

J

JF Bouthillier

Hi all,

Can someone tell me how I can avoid the Before Update
event of a form when the record is already updated?

Thank you.
JF
 
W

Wayne Morgan

More information please about the steps you are going through to cause this.
 
J

JF Bouthillier

I am implementing an audit trail functionality on the
form. As soon as there is a change in any of the fields
of the form, the audit trail in the Before Update event
is executed.

In one of the form fields, I am doing another event which
also triggers data changes in the form. I want to avoid
executing the Update Event after this new event.

Is there an easy way to do this?

Thank you in advance.
JF
 
P

Patrick Graham

So you have 2 controls:

If the first control is altered an event occurs.
The 2nd control has a similar event but you only want it
to run if the first control hasnt already run.

Im thinking you could use Dirty. Something like,

2ndcontrol_BeforeUpdate()
if 1stcontrol.dirty = false then
2ndcontrol code
end if
 
W

Wayne Morgan

Are you talking about the form's or the control's before update event?

From the help file:
"Changing data in a control by using Visual Basic or a macro containing the
SetValue action doesn't trigger these events for the control. However, if
you then move to another record or save the record, the form's BeforeUpdate
event does occur."

If you are talking about the form's before update event, then what are you
doing to trigger it "As soon as there is a change in any of the fields of
the form..."?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top