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!

Aborting an automatic insert

Status
Not open for further replies.

GreenFella

Programmer
Oct 23, 2001
41
0
0
CA
Is there any way that an automatic insert can be aborted from the Before Insert Event.

I have a situation where records are being inserted into a status table automatically. As part of the before insert I am checking to make sure the effective date of the transaction falls within a prescribed range.

If it does, great, the insert can proceed.

If it does not, I would like a way to stop the insert from taking place after having displayed an error message explaining why.

Any and all suggestions will be greatly appreciated.

Thanks
Greenfell
 
Simply set the Cancel argument to True

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Cool.

I knew it had to be something straightforward but just couldn't figure out what it was.

Thanks for your help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top