Link to home
Start Free TrialLog in
Avatar of J G
J G

asked on

Omit After Update event

When I run a certain query, I want Access to skip the after update events on a sub form.  Is this possible?
ASKER CERTIFIED SOLUTION
Avatar of Dale Fye
Dale Fye
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of J G
J G

ASKER

Would this be how to set the form level variable?  I am also wondering whether this is necessary.  I run a query that updates records that have afterupdate events I don't want to run after.


Private Sub Bypass()
Dim BypassAU As Variant ' variable to bypass After Upate events
BypassAU = True
End Sub

then in the afterupdate events:

If BypassAU = True Then
BypassAU = False

Exit Sub

Else
Are you talking about a data macro which fires when you update a record in your table, or preventing the AfterUpdate event of a form from firing?

What version of Access?
Avatar of J G

ASKER

preventing a After Update event from firing.
Avatar of J G

ASKER

2016.

I am initially running a query that updates fields.  These fields also have AfterUpdate events that I want to bypass after the initial query is run.