Re: me.undo

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



I looked at the code in the file. It appears that after entering the
duplicate record, you are moving to the next new record by clicking a button
you've added to the form. The code in this button uses
DoCmd.GoToRecord,,acNewRec. Yet, you've just canceled the update and told
the form to go to the duplicate record in the BeforeUpdate event. It won't
do both, hence the error. I added a "flag" variable to catch this situation
and skip the attempt to go to the new record.

--
Wayne Morgan
MS Access MVP


.



Relevant Pages

  • Re: me.undo
    ... Thank you so much Wayne, for all your help with this issue. ... patience, and time. ... you are moving to the next new record by clicking a button ... >> the form to go to the duplicate record in the BeforeUpdate event. ...
    (microsoft.public.access.modulesdaovba)
  • Combo box for Searching
    ... the related record. ... record and gives an error because it will create a duplicate record. ... Regards John ... Prev by Date: ...
    (microsoft.public.access.formscoding)
  • Re: Error in post with ADOSQLServer
    ... > Yes is one table with 86.500 record!!, I need delete all duplicate record. ... SQL is complaining that it ... Maurice ... Prev by Date: ...
    (borland.public.delphi.database.ado)
  • Re: Error in post with ADOSQLServer
    ... Yes is one table with 86.500 record!!, I need delete all duplicate record. ... >> When execute this instruction: ... >> PTTK ... Prev by Date: ...
    (borland.public.delphi.database.ado)
  • Re: Duplicate Values in the index, primary key or relationship
    ... Need to run a 'match' query to find duplicate record. ... I think that the most common case of seeing that message is when entering a ...
    (microsoft.public.access.tablesdbdesign)