transfer database

  • Thread starter Thread starter JonoB
  • Start date Start date
J

JonoB

I have a database split into FE and BE. I need to import
data from a table in another database into the BE of my
database. I have managed to get docmd.transferdatabase to
work, but this imports the table into the FE. How do I
specify the source to be the BE? My current code looks
like this:

DoCmd.TransferDatabase acImport, "Microsoft
Access", "M:\FININST\Hedge Funds
Reports\CpVaR\TradeVaRtool.mde", _
acTable, "tblPBRXMCodeLDN", "tblPBRXMCodeLDN"

The destination should be a table in the following path:
M:\FININST\Hedge Funds Reports\Database\Prototype_BE.mdb

Perhaps I should be using acExport instead?

Thanks for the help.
 
Hi Jon,

You can do this with a query. If you're importing to a table that
already exists in the BE, use an INSERT INTO ... (append) query and use
an IN clause to specify the external source, something like

INSERT INTO tblPBRXMCodeLDN (Field1, Field2...)
SELECT Field1, Field2...
FROM tblPBRXMCodeLDN
IN 'M:\FININST\Hedge Funds Reports\CpVaR\TradeVaRtool.mde';

I feel it's a bad idea to create tables in the BE under program control;
I'd open the BE directly and import the table manually. But it should be
possible to do it with a SELECT INTO (maketable) query with two IN
clauses.


I have a database split into FE and BE. I need to import
data from a table in another database into the BE of my
database. I have managed to get docmd.transferdatabase to
work, but this imports the table into the FE. How do I
specify the source to be the BE? My current code looks
like this:

DoCmd.TransferDatabase acImport, "Microsoft
Access", "M:\FININST\Hedge Funds
Reports\CpVaR\TradeVaRtool.mde", _
acTable, "tblPBRXMCodeLDN", "tblPBRXMCodeLDN"

The destination should be a table in the following path:
M:\FININST\Hedge Funds Reports\Database\Prototype_BE.mdb

Perhaps I should be using acExport instead?

Thanks for the help.

John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
 
Back
Top