Cancelling data entry on the Before Update Event

M

Mark

I am working in an Access 97 SR-2 database.

I have a field on a form that I want to review what the
user is entering in it before I allow them to continue. On
the Before Update event of the control I have some code
that I use to evaluate if it is a valid entry. (It is too
complex to do with a validation rule). If I determine that
I want to cancel the entry how do I do it in VBA code? I
do not want it to cancel the whole record. Just the
changes to that field. And I do not want it to fire the
After Update Event because I am cancelling the entry.

Thanks if you have an answer!

Mark
Canada
 
B

Bob Barnes

Use an If statement to evaluate your requirement
If it's true, then include "Cancel = True" within the If coding

This can also be used in the _Exit event

HTH - Bob
 

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