Re: Wierd behavior while inserting a record...



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
..

"TC2" <TC2@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:7243F547-7B36-4582-8D22-3127D7210990@xxxxxxxxxxxxxxxx

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


.



Relevant Pages

  • Re: duplicates query help & strategy for update queries with SetWarnings = False
    ... I'm calling a function that will set the occurence number. ... If there's a duplicate, ... I used the query wizard to create a "find duplicates" query, now I need to adjust the results of that query to add an occurence counter/number, and I'd be set. ... Once the user has handled all the problems, you enable the final command button at the bottom of the form, which executes an append query to add the data to the real table. ...
    (comp.databases.ms-access)
  • Re: Identifying Duplicate Records
    ... Indeed, the duplicate records ... Discovering the Find Duplicate query, ... or bring up the dupe records to look at them. ... have a find duplicate records wizard. ...
    (microsoft.public.access.formscoding)
  • Re: Identifying Duplicate Records
    ... the duplicate records problem represented one of the few occasions ... the Find Duplicate query, however, has allowed me to plug another gap in my ... or bring up the dupe records to look at them. ...
    (microsoft.public.access.formscoding)
  • Re: duplicates query help & strategy for update queries with SetWarnings = False
    ... After playing around with duplicates, and a funtion to generate an occurence number, it looked like you would need a handful of queries per table!! ... Once the user has handled all the problems, you enable the final command button at the bottom of the form, which executes an append query to add the data to the real table. ... On a "Find Duplicates Query", does anyone have a good solution for renaming the duplicate records? ...
    (comp.databases.ms-access)
  • Re: Please help!
    ... From the 2nd row down to the last is the same duplicate ... Allen Browne - Microsoft MVP. ... In a query, depress the Total button on the Toolbar. ... Access adds a Total row to the grid. ...
    (microsoft.public.access.forms)