Wierd behavior while inserting a record...

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

Guest

Hi folks,

I have a need to edit existing records, using a form, and save them as new
records (to keep a running history of changes). I created an INSERT query to
add the edited records as new ones. That works fine. However, the record
I'm using to populate the form is also being changed. So... in essence, I'm
always creating a new record that's and exact duplicate of another, ARRGHHH!
I just want to create the new record from the source data and leave the
original record alone. Suggestions anyone?!

Thanks,

TC2
 
Without knowing the entire sequence of you operation, I can suggest that you
use ME.Undo on the form to undo all the changes that you have made.

That assumes that you are opening a form to a specific record and then using
the values of the form's controls to build your Insert query.

Alternative would be to create a new record that is a duplicate of the
existing record and then modify the duplicate. That would mean you would
not need the insert query and you would not need to worry about
modifications to the existing record. You would need to handle the
situation where the record was duplicated and then the user decided to make
no changes.



--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
Hi John,

Me.Undo worked perfectly! That's exactly what I was looking for; a simple
solution.

Thank You!

TC2
 
Back
Top