cancel move to next record

  • Thread starter Thread starter LGarcia
  • Start date Start date
L

LGarcia

Hi all,
I have some code to error trap a field on a form. It's on the exit event of
the field. The problem occurs when my user enters data into this field and
then clicks on the next record button on the navigation bar at the bottom of
the form instead of hitting the enter key. My code runs but my error message
now refers to the current record. Is there a way to cancel the move to next
record if my error trap catches something? Using AXP.
Thanks!
LGarcia
 
I believe you have to put the following line in your code to stop the "exit"
event and keep you in the same record...

Cancel=True
 
LGarcia

It may be more suitable to put your validation code on the BeforeUpdate
event of the form itself. Then you can cancel the record update if the
condition is not satisfied, and the next record will not be accessed.
 

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

Back
Top