Duplicate Record Issue (I Think)

  • Thread starter jversiz via AccessMonster.com
  • Start date
J

jversiz via AccessMonster.com

Hello,

I have looked for an answer on this one, but can't seem to find what I am
looking for, so here I am.

First of all, I am on Access 2000.

I have a command button on my form (with a subform) that duplicates the
current record. When I push the command button, it makes a new record and
copies the data into the clipboard, but it does not paste the data into the
new record. When I go to the record created, all fields are blank. When I
paste what is in the clipboard manually, I get the following error:

Some of the field names for the data you tried to paste don't match the field
names on the form.

Am I just overlooking the names on the form vs the names of the fields in my
table, or is there something that I don't know about main form w/ subform
copying? Thanks in advance.

Best Regards,
James C.
EDI Analyst
 
J

Jeff Boyce

Before we get into main form w/ subform and a question of which you are
trying to copy from/to, I'd like to point out that a well-normalized data
structure would probably not require "duplicate" records. If you'll
describe a bit more specifically what data you are trying to duplicate, the
folks here may be able to offer more specific suggestions.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
J

jversiz via AccessMonster.com

Right-O.

This is a database for storing item related info. The ItemNumber field is
indexed (no duplicates), but it is not the PK. The PK, which is called
RecordID, is an auto number field. My intention is for the person needing to
copy an item would push the command button, then change the ItemNumber on the
new record. I have looked into finding a module that will copy everything
except for the ItemNumber, but I think it's more complicated than what it's
worth.

Anyhow, any help would be greatly appreciated. Thanks.

James C.



Jeff said:
Before we get into main form w/ subform and a question of which you are
trying to copy from/to, I'd like to point out that a well-normalized data
structure would probably not require "duplicate" records. If you'll
describe a bit more specifically what data you are trying to duplicate, the
folks here may be able to offer more specific suggestions.

Regards

Jeff Boyce
Microsoft Office/Access MVP
[quoted text clipped - 23 lines]
James C.
EDI Analyst
 
J

Jeff Boyce

You've described someone "needing to copy an item", but not why (or provided
an example of an item that would need copying.

What comes to mind when I read this is something like how I'd have to copy a
lot of item-specific information into another row if I were working in a
spreadsheet.

A little more info, please?

Thanks!

Regards

Jeff Boyce
Microsoft Office/Access MVP

jversiz via AccessMonster.com said:
Right-O.

This is a database for storing item related info. The ItemNumber field is
indexed (no duplicates), but it is not the PK. The PK, which is called
RecordID, is an auto number field. My intention is for the person needing
to
copy an item would push the command button, then change the ItemNumber on
the
new record. I have looked into finding a module that will copy everything
except for the ItemNumber, but I think it's more complicated than what
it's
worth.

Anyhow, any help would be greatly appreciated. Thanks.

James C.



Jeff said:
Before we get into main form w/ subform and a question of which you are
trying to copy from/to, I'd like to point out that a well-normalized data
structure would probably not require "duplicate" records. If you'll
describe a bit more specifically what data you are trying to duplicate,
the
folks here may be able to offer more specific suggestions.

Regards

Jeff Boyce
Microsoft Office/Access MVP
[quoted text clipped - 23 lines]
James C.
EDI Analyst
 
J

jversiz via AccessMonster.com

Sorry I am not being very descriptive. It's not one of my strong points.

I have now been able to atleast get the item to copy, but I still get the
warning that I first described.

We are in an industry where colors and styles of a given item change
seasonaly. The person needing to copy an item just needs the info from the
mainform (all the info in a row as you've described). The subform info
consists of all of the components needed to make this item (kind of like a
bill of materials). The reality of it is that all of the info on the subform
is going to change, so I don't need this info to be copied. For instance:


Mainform
ItemNumber: 12345
ProductName: Super Widgit

Subform
ItemNumber: 12345 ComponentNumber: 00000
ItemNumber: 12345 ComponentNumber: 11111

The ItemNumber is not displayed on my subform, but the relationship is setup
in the relationships window as a one to many relationship (referential
integrity is enforced, but cascades are not). Hopefully this is all the info
you need, but please let me know if it isn't. What I am thinking is that it
has something to do with it copying the subform info.

Regards,
James C.




Jeff said:
You've described someone "needing to copy an item", but not why (or provided
an example of an item that would need copying.

What comes to mind when I read this is something like how I'd have to copy a
lot of item-specific information into another row if I were working in a
spreadsheet.

A little more info, please?

Thanks!

Regards

Jeff Boyce
Microsoft Office/Access MVP
[quoted text clipped - 30 lines]
 
J

jversiz via AccessMonster.com

Sorry I am not being very descriptive. It's not one of my strong points.

I have now been able to atleast get the item to copy, but I still get the
warning that I first described.

We are in an industry where colors and styles of a given item change
seasonaly. The person needing to copy an item just needs the info from the
mainform (all the info in a row as you've described). The subform info
consists of all of the components needed to make this item (kind of like a
bill of materials). The reality of it is that all of the info on the subform
is going to change, so I don't need this info to be copied. For instance:


Mainform
ItemNumber: 12345
ProductName: Super Widgit

Subform
ItemNumber: 12345 ComponentNumber: 00000
ItemNumber: 12345 ComponentNumber: 11111

The ItemNumber is not displayed on my subform, but the relationship is setup
in the relationships window as a one to many relationship (referential
integrity is enforced, but cascades are not). Hopefully this is all the info
you need, but please let me know if it isn't. What I am thinking is that it
has something to do with it copying the subform info.

Regards,
James C.




Jeff said:
You've described someone "needing to copy an item", but not why (or provided
an example of an item that would need copying.

What comes to mind when I read this is something like how I'd have to copy a
lot of item-specific information into another row if I were working in a
spreadsheet.

A little more info, please?

Thanks!

Regards

Jeff Boyce
Microsoft Office/Access MVP
[quoted text clipped - 30 lines]
 
J

Jeff Boyce

James

Maybe I'm just dense on this. I can't really tell what it is that's being
copied.

I will point out, though, that if your main form/subform setup follows the
standard pattern, the subform will be based on a table that includes a
"foreign key" that points back to the main form's (i.e., parent table's)
primary key, ... AND you need to tell Access that this is the relationship
between the main form and the subform (i.e., the common field).

Thereafter, each time you add a new record to the subform, it automatically
inherits the foreign key value of the parent record on the main form.

So far, from your description, the only thing I see being "copied" is the
primary key (i.e., ItemNumber) ... and that is NOT necessary! (see previous
description of how main form/subform works).

What am I missing?

Regards

Jeff Boyce
Microsoft Office/Access MVP


jversiz via AccessMonster.com said:
Sorry I am not being very descriptive. It's not one of my strong points.

I have now been able to atleast get the item to copy, but I still get the
warning that I first described.

We are in an industry where colors and styles of a given item change
seasonaly. The person needing to copy an item just needs the info from
the
mainform (all the info in a row as you've described). The subform info
consists of all of the components needed to make this item (kind of like a
bill of materials). The reality of it is that all of the info on the
subform
is going to change, so I don't need this info to be copied. For instance:


Mainform
ItemNumber: 12345
ProductName: Super Widgit

Subform
ItemNumber: 12345 ComponentNumber: 00000
ItemNumber: 12345 ComponentNumber: 11111

The ItemNumber is not displayed on my subform, but the relationship is
setup
in the relationships window as a one to many relationship (referential
integrity is enforced, but cascades are not). Hopefully this is all the
info
you need, but please let me know if it isn't. What I am thinking is that
it
has something to do with it copying the subform info.

Regards,
James C.




Jeff said:
You've described someone "needing to copy an item", but not why (or
provided
an example of an item that would need copying.

What comes to mind when I read this is something like how I'd have to copy
a
lot of item-specific information into another row if I were working in a
spreadsheet.

A little more info, please?

Thanks!

Regards

Jeff Boyce
Microsoft Office/Access MVP
[quoted text clipped - 30 lines]
James C.
EDI Analyst
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top