M
Matt Schultz
This one requires some background info, so here goes...
Two tables: Sites and CallCard. Sites has a primary key autonumber called
SiteID. CallCard has a primary key autonumber CCID, with a foreign key to
Sites.SiteID (one-to-many, CallCard is the many).
One query: ActiveCards. Brings in all fields from CallCard by name and
Sites.Acronym, Sites.Subsite, Sites.POC.
One form: Based on ActiveCards, with all the fields it contains. There is a
combo box for CallCard.SiteID, created by dragging the field from the field
list, that shows Sites.SiteID and Sites.Acronym. The combo box is bound to
CallCard.SiteID.
Here's the issue. I can add new records on this form without problems. If
I try to copy an existing record in the form, though, things go crazy. I
select the record, hit Copy, then Paste Append. I get a message that there
is no match for SiteID in the 'one' table of the one-to-many relationship
(in this case, Sites). I can see behind the message that when it tried to
paste, though, it didn't keep the SiteID from the combo box, but is trying
to use the next available SiteID from the Sites table, as if it was trying
to create a new record there too.
I know I'm missing something, and it seems simple, but I can't get it.
Any help would be GREATLY appreciated. TIA!
Matt
Two tables: Sites and CallCard. Sites has a primary key autonumber called
SiteID. CallCard has a primary key autonumber CCID, with a foreign key to
Sites.SiteID (one-to-many, CallCard is the many).
One query: ActiveCards. Brings in all fields from CallCard by name and
Sites.Acronym, Sites.Subsite, Sites.POC.
One form: Based on ActiveCards, with all the fields it contains. There is a
combo box for CallCard.SiteID, created by dragging the field from the field
list, that shows Sites.SiteID and Sites.Acronym. The combo box is bound to
CallCard.SiteID.
Here's the issue. I can add new records on this form without problems. If
I try to copy an existing record in the form, though, things go crazy. I
select the record, hit Copy, then Paste Append. I get a message that there
is no match for SiteID in the 'one' table of the one-to-many relationship
(in this case, Sites). I can see behind the message that when it tried to
paste, though, it didn't keep the SiteID from the combo box, but is trying
to use the next available SiteID from the Sites table, as if it was trying
to create a new record there too.
I know I'm missing something, and it seems simple, but I can't get it.
Any help would be GREATLY appreciated. TIA!
Matt