Copy db object

  • Thread starter Thread starter SAC
  • Start date Start date
S

SAC

I'm trying to copy a db object...a table, but when I do it using the
docmd.copyobject from a frontend db it copies the link. How can I copy the
actual table using code?

Thanks.
 
SAC said:
I'm trying to copy a db object...a table, but when I do it using the
docmd.copyobject from a frontend db it copies the link. How can I
copy the actual table using code?

If you want to copy a table from the back-end to the front-end, you can
use DoCmd.TransferDatabase to do it. You can extract necessary
information from the TableDef object of the linked table: the path to
the back-end database is part of the value in the Connect property
(starting at position 11, IIRC), and the table name itself is in the
SourceTableName property.
 
Back
Top