Need help in coding

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have code I need to put after user chooses to save
the record at run time.

What is the best place to put code?
I tried on Form -> After Insert, I get error 'Index key violation' as I am
generating value for Primary Key in
after insert.

I don't want to user Form -> Before Insert as I don't want
to generate the number before user completes the form
and is ready to save.

Another question is how can I implement
'Do you want to save ? '

At present I have this on Form -> Before Update.

Thanks for your help!
-Me
 
Form_BeforeUpdate is the correct place to ask for confirmation to save.

It is also the correct place if you want to assign a key value. That makes
better sense than allowing the record to save, and then trying to change the
key value.
 
Back
Top