Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access Event question

Status
Not open for further replies.

121854

MIS
Aug 2, 2003
60
0
0
US
Is there anyway that I can set "on" or "off" within access VBA?

I would like to know if there a way to override events within VBA.

Please help.
 
Depending on your requirement you can write and "If" statement at the begining of the Event and use "Exit Sub" statement to skip/override the event.

Regards,
 
What exactly you want to do?

________________________________________________________
Zameer Abdulla
Help to find Missing people
Education's purpose is to replace an empty mind with an open one.
~Malcolm S. Forbes~
 
For example I would like to bypass or cancel the update to a record before the after update event. Or I would like to set up a before update event while I'm in the Enter or Focus event.

Is there anyway that I can set those events in VBA if I'm in another event like set True After Update or set cancel the After Update events.

Hopefully, this explanation help. Thank you everyone.
 
To cancel the update to a record before the after update event, you use the forms before update event, and issue a

[tt]Cancel = True[/tt]

If you cancel the before update event of the form, the after update event of the form will not trigger.

But - I second ZmrAbdullas question - I still haven't the foggiest what you're really trying to achieve ... except you're talking about form events, which is really more appropriate in the forms forum (forum702)

Roy-Vidar
 
Non easy but fully controlled method is to use unbound form.
Add/Edit, Validate, Discard/Update record

________________________________________________________
Zameer Abdulla
Help to find Missing people
Education's purpose is to replace an empty mind with an open one.
~Malcolm S. Forbes~
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top