M
Max Yaffe
I'm having a problem copying and pasting records in a subform.
Here's the context -- I have a Purchase Order form with a subform
containing line items. The PurchaseOrder table's primary key is PO.
The LineItem table's primary key is PO+LineNo.
I can select a line item record on the subform and using the menu or
^C do a copy. The line item record is copied.
However, when I go to the end and do a paste I run into the problem
that the line number has also been copied and cannot be pasted since
the key already exists.
So... I need to modify the line number in the paste buffer before the
data is pasted.
I've tried putting code into the BeforeInsert() and BeforeUpdate()
event handlers without success.
What is the best way to do this.
Thanks,
Max
Here's the context -- I have a Purchase Order form with a subform
containing line items. The PurchaseOrder table's primary key is PO.
The LineItem table's primary key is PO+LineNo.
I can select a line item record on the subform and using the menu or
^C do a copy. The line item record is copied.
However, when I go to the end and do a paste I run into the problem
that the line number has also been copied and cannot be pasted since
the key already exists.
So... I need to modify the line number in the paste buffer before the
data is pasted.
I've tried putting code into the BeforeInsert() and BeforeUpdate()
event handlers without success.
What is the best way to do this.
Thanks,
Max