empty record after BeforeUpdate validation

E

eugenio.pombi

Hi to everybody,

I successfully put a validation rule that controls that the value
inserted in a field is valid.
On the BeforeUpdate event I trigger the validation code and if anything
goes wrong I give cancel = true.

The result of this is that the user is stuck inside the field until he
puts a valid value or leaves a blank field. And this can be ok.

The validated field is put as the first field of the form. It can
happen that after the error message the user decides to leave the field
blank and don't continue insert process. The problem is that access
adds anyway a new record that is completely blank.

I tried to put cancel=true on form BeforeUpdate if all fields are
empty, but this makes the user stuck in the present empty record. I
tried also to fire Me.undo on form AfterUpdate but it doesn'work, an
empty record remains inside the table.

Could you please help me.
 

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