Exporting data from one dbase to another

T

Todd

How can I export a couple tables from one access dbase to
another. I'd like to be able at any time to send (via a
command button) updated data from certain tables in my
dbase to another one out on the network that has the same
tables I've got. Each time I send the info, it will
replace the current data in it.

I really don't know the best approach to take and was
wondering what is the best way to do it (export data or
link data). The dbase on the network is really just for
informational purposes for my field offices. So they won't
be entering data in the network dbase, just searching for
information and status of items.

Hopefully I wasn't too confusing with my explanation.
 
G

Guest

hi,
i would recommend just linking the tables to the db on the
network. update to your db would be instanious to the
network db. you wouldn't have to export at various times.
it would be automatic. that is one of the pluses of linked
tables.
 
T

Todd

Thanks for the info. One question, when the two tables
are linked, can only data from my dbase be transfered up
to the dbase on the network or can it also work the other
way (entering data from the network dbase and data is
transfered down to my local dbase)? I don't want data
sent back to my local dbase if entered, only sent from
mine to the one on the network.
 
G

George Nicholson

I believe linking is a 2 way street. Import/Export are 1 way.

You might also consider replication. I might give you more control over
timing and direction of data updates.
 
J

John Nurick

Hi Todd,

One way of doing this would be

1) Set up linked tables in "your" database, linked to the tables you
want to update in the "network" database. These should be additional to
the existing tables in your database: they'll only be used when you want
to update the network database.

2) Build queries that update the data. Normally to replace the existing
data in the linked table tblLinkedXXX with data in the local table
tblXXX, you'd use one query to delete the existing data and another to
append the new data, something like this (in SQL view):
DELETE FROM tblLinkedXXX;
and
INSERT INTO tblLinkedXXX SELECT * FROM tblXXX;
Things may more complicated if there are relationships in the network
database the involve these tables.

3) Execute the queries from your command button, e.g. with

Dim dbD As DAO.Database

Set dbD = CurrentDB()
dbD.Execute("DELETE FROM tblLinkedXXX;", dbFailOnError)
dbD.Execute("INSERT INTO blah blah...)
...
Set dbD = Nothing
 

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