transfer database

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.
 
J

John Nurick

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top