Copy records from one database to another without linking tables

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
 
D

Douglas J Steele

I don't understand why you want to be linked to the other database, but you
don't want a linked table.
 
R

Reidar

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
 
D

Douglas J Steele

Why not create linked tables in the front-end to the other database as well?
 
D

Douglas J Steele

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