| Computers Forum Index » Computer - Databases - MS Access » Copy or Duplicate Record Woes... |
|
Page 1 of 1 |
|
| Author |
Message |
| bobdydd... |
Posted: Wed Oct 14, 2009 9:02 pm |
|
|
|
Guest
|
Hi Everybody
Access 2007
I have a form based on a query that does NOT
include the primary key autonumber
And I am trying to use the "Duplicate" command
Yet I get the error that this new record has created
"duplicate Values in the Index, Primary Key, or Relationship"
Is there any other way to copy a record?
Thanks |
|
|
| Back to top |
|
|
|
| Marco Pagliero... |
Posted: Wed Oct 14, 2009 10:50 pm |
|
|
|
Guest
|
On 14 Okt., 23:02, bobdydd wrote:
Quote: I have a form based on a query that does NOT
include the primary key autonumber
And I am trying to use the "Duplicate" command
Yet I get the error that this new record has created
"duplicate Values in the Index, Primary Key, or Relationship"
Is there any other way to copy a record?
Not only the primary key autonumber, but every field in a table could
be "indexed without duplicates". Maybe you'd like to assure yourself
that there is no such a field in your table before looking for other
ways of duplicating records.
greetings
Marco P |
|
|
| Back to top |
|
|
|
| Jeff Boyce... |
Posted: Thu Oct 15, 2009 2:09 am |
|
|
|
Guest
|
First, why?
In a well-normalized relational database, you probably won't need to "copy a
record", even if you're intending to give it a new unique record ID.
Perhaps there's a different way to accomplish what you're after .. which is
....? You are trying to solve a business need by "copying a record" ...
what's that business need?
Regards
Jeff Boyce
Microsoft Access MVP
--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.
Any code or psuedocode included in this post is offered "as is", with no
guarantee as to suitability.
You can thank the FTC of the USA for making this disclaimer
possible/necessary.
"bobdydd" <reallyuseful2004 at (no spam) yahoo.co.uk> wrote in message
news:09fd916a-0a4e-4bb7-a26e-8040f0a31d91 at (no spam) l34g2000vba.googlegroups.com...
Quote: Hi Everybody
Access 2007
I have a form based on a query that does NOT
include the primary key autonumber
And I am trying to use the "Duplicate" command
Yet I get the error that this new record has created
"duplicate Values in the Index, Primary Key, or Relationship"
Is there any other way to copy a record?
Thanks |
|
|
| Back to top |
|
|
|
| Marshall Barton... |
Posted: Thu Oct 15, 2009 2:55 am |
|
|
|
Guest
|
bobdydd wrote:
Quote: Access 2007
I have a form based on a query that does NOT
include the primary key autonumber
And I am trying to use the "Duplicate" command
Yet I get the error that this new record has created
"duplicate Values in the Index, Primary Key, or Relationship"
Is there any other way to copy a record?
Well, there are several ways to copy a record, but you can
never add a record with a duplicate primary key no matter
what you do. Maybe it would help if you provided more
details about the table's primary key field.
What is a Duplicate command? A command button with it's
Click event procedure generated by the Duplicate Record
wizard??
--
Marsh |
|
|
| Back to top |
|
|
|
|