Transfer problem

MartinO

Registered User.
Local time
Today, 20:42
Joined
Oct 8, 2002
Messages
22
Hi,
I'm trying to import a query from another access database. The code appears to work, the query name appears in the query folder. However when I try to open the query I get the message that the jet engine cannot find the table that the original query is based on.
The code I'm using is
Private Sub Command0_Click()

Dim DREAD As String
DREAD = "N:\review\Reports\DesRep.mdb"
DoCmd.TransferDatabase acImport, "microsoft access", DREAD, acQuery, "_BURNDOWN", "_BURNDOWN"
End Sub

Anyone any Ideas?
 
Check the spelling of the tables in both databases. One of the table names might be spelled wrong.

While you are at it, check the spelling of the transferred query in SQL design mode to see that no extraneous text came along for the ride.
 
Do you want to import the actual querydef or the recordset it creates? You are currently importing the querydef and its SQL is referring to a table that is not in the current database.
 
Pat Hartman said:
Do you want to import the actual querydef or the recordset it creates? You are currently importing the querydef and its SQL is referring to a table that is not in the current database.

I've just discovered that if I have a linked table it seems to work. I was hoping to run the query in the external database and the import the results
 

Users who are viewing this thread

Back
Top Bottom