Copy records from one database to another without linking tables

  • Thread starter Thread starter Reidar
  • Start date Start date
R

Reidar

I want to open a connection to another database, copy certain records from a
table
to a table in the just opened database and then close the connection again.
The reason I want be linked to the other database all the time is that
it slows down 'the saving of record time' dramatically.
reidarT
 
I don't understand why you want to be linked to the other database, but you
don't want a linked table.
 
Rephrasing question:
I have a front-end database with a link to a database (all access)
In the front-end database I want to copy records from the linked database to
a third database which is not linked to the front-end database.
reidarT
 
Why not create linked tables in the front-end to the other database as well?
 
I have a link in the front-end to both back-end databases.
The problem is when I save a record from a form in the front-end db, the
saving process is so slow the customer have to wait up to 30 seconds or one
minute.
When I remove the link to th other back-end database, the saving process is
back to normal.
I need to save records in the second back-end db once a day, but I need a
lookup from the second back-end db several times pr. day.
The customer adds from 100-300 records a day in the first back-end db

Reidar
 
Dynamically add the links to the second back-end when you need it, and
delete the linked tables when you're done.
 
Thanks,
The 'dynamically' example is what I am asking for.
Thanks in advance
reidarT
 
To delete linked tables:

Dim dbCurr As DAO.Database
Dim intLoop As Integer

Set dbCurr = CurrentDb
For intLoop = (dbCurr.TableDefs.Count - 1) To 0 Step -1
If Len(dbCurr.TableDefs(intLoop).Connect) > 0 Then
dbCurr.TableDefs.Delete dbCurr.TableDefs(intLoop).Name
End If
Next intLoop

You can use the TransferDatabase method to relink the tables.
 

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

Back
Top