PC Review


Reply
Thread Tools Rate Thread

After Duplicating a Record, How do you delete the relationship???

 
 
=?Utf-8?B?TWljaGVsbGU=?=
Guest
Posts: n/a
 
      3rd Feb 2005
All I am trying to do is to copy a previous record into a new one - more like
prefilling a form based on the values of the previous record. I added a
command button for that using the wizard and right there is the duplicate
record button. it works fine. however, i would need to edit my now new
record to reflect some minor changes like the of the record. For some reason
I don't know, once I edit the new record, the contents of the old record gets
erased!

Why is that and how can I stop this?

Thanks a million!
 
Reply With Quote
 
 
 
 
John Vinson
Guest
Posts: n/a
 
      3rd Feb 2005
On Thu, 3 Feb 2005 11:23:03 -0800, "Michelle" <Michelle
@discussions.microsoft.com> wrote:

>All I am trying to do is to copy a previous record into a new one - more like
>prefilling a form based on the values of the previous record. I added a
>command button for that using the wizard and right there is the duplicate
>record button. it works fine. however, i would need to edit my now new
>record to reflect some minor changes like the of the record. For some reason
>I don't know, once I edit the new record, the contents of the old record gets
>erased!
>
>Why is that and how can I stop this?
>
>Thanks a million!


Please post the wizard code. That shouldn't be happening! What's the
Primary Key of the table? Are you assigning a new value for the new
record?


John W. Vinson[MVP]
 
Reply With Quote
 
=?Utf-8?B?TWljaGVsbGUgSw==?=
Guest
Posts: n/a
 
      4th Feb 2005
This is the code behind the button. The primary key is called MainIndex and
when I look at the form in the datasheet view (I even went ahead and
displayed the primary key on the form), they are completely separate. It's
totally driving me nuts! It's not supposed to be rocket science!

Thanks. Just venting and quite frustrated.

Private Sub cdmDuplicate_Click()
On Error GoTo Err_cdmDuplicate_Click


DoCmd.RunCommand acCmdSelectRecord
DoCmd.RunCommand acCmdCopy
DoCmd.RunCommand acCmdPasteAppend


Exit_cdmDuplicate_Click:
Exit Sub

Err_cdmDuplicate_Click:
MsgBox Err.Description
Resume Exit_cdmDuplicate_Click

End Sub

"John Vinson" wrote:

> On Thu, 3 Feb 2005 11:23:03 -0800, "Michelle" <Michelle
> @discussions.microsoft.com> wrote:
>
> >All I am trying to do is to copy a previous record into a new one - more like
> >prefilling a form based on the values of the previous record. I added a
> >command button for that using the wizard and right there is the duplicate
> >record button. it works fine. however, i would need to edit my now new
> >record to reflect some minor changes like the of the record. For some reason
> >I don't know, once I edit the new record, the contents of the old record gets
> >erased!
> >
> >Why is that and how can I stop this?
> >
> >Thanks a million!

>
> Please post the wizard code. That shouldn't be happening! What's the
> Primary Key of the table? Are you assigning a new value for the new
> record?
>
>
> John W. Vinson[MVP]
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Duplicating record =?Utf-8?B?UGV0ZXIgU2NobWl0eg==?= Microsoft Access Getting Started 1 6th Mar 2007 08:17 PM
Append new record - duplicating previous record =?Utf-8?B?UG9zc2UgSm9obg==?= Microsoft Access Form Coding 2 28th May 2006 03:45 PM
Duplicating a record =?Utf-8?B?TWFyYw==?= Microsoft Access Forms 7 23rd Feb 2005 02:21 PM
Duplicating a record, except... J W Crosby Microsoft Access Forms 1 9th Apr 2004 10:33 PM
Duplicating a record Dave Microsoft Access Database Table Design 4 15th Jul 2003 01:43 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:38 AM.