Copy Record within Same Table

  • Thread starter Thread starter vseale
  • Start date Start date
V

vseale

I know(!), but I have a legitimate need to copy an
existing record within a table and I don't believe
openrecordset.clone or AddNew are the most efficient way
to do it. I have 90 fields and don't want to
use .AddNew. All the examples I've found use
Openrecordset.clone within a form that the user controls,
I don't see how to apply it to an automated process. The
records are programmatically pulled in when a PDA is
hotsynced. After it copies the outside file into a table,
I want to loop through it and duplicate any record that
has two fields containing values (barcode1 and/or
barcode1). The new record will then have certain fields
updated to make it unique. (I've got this part of the
code working.) Any help on this is greatly appreciated.
 
okay, i'll resist comment... <g>

if you can write a Select query to pull the records you want to duplicate,
then turn the query into an Append query and append the record(s) back to
the same table. this won't work if the duplicate record violates a primary
key or unique index field in the table. on the other hand, depending on how
you're coming up with values to update those certain fields (that you
mentioned below) in the "new" record, you may be able to insert those values
into the new record(s) at append time - killing two birds with one stone, so
to speak.

hth
 
Back
Top