Runtime Error- 3192, Could not find output table. INSERT INTO

pedie

Well-known Member
Joined
Apr 28, 2010
Messages
3,875
Hi, 'm recieving this error when i try to select all data from
Budget_INFO in different datatbase into Budget_INFO in this databse.

Please advice, 'm i useful some illegal statement here:)
Thanks


Sub InsertIntoX1()
Dim dbs As Database
Dim rst As DAO.Recordset

Set dbs = OpenDatabase("E:\Personal_Files\Access\Database4.accdb")
Set rst = CurrentDb.OpenRecordset("Budget_INFO", dbOpenDynaset)

dbs.Execute " INSERT INTO Budget_INFO1 " _
& "SELECT * " _
& "FROM [Budget_INFO];"

dbs.Close
End Sub
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
The table in the external database has to be linked in the database where you run the execute command (so it can be "seen" just like a local table). Your attempt to open a recordset does nothing I'm afraid - it has nothing to do with the Execute command you want to run.
 
Upvote 0
Okay Xen, i have no idea what I was doing...I just looked at the exmaple and tried to make it work for me, but didnt:biggrin:
And yes, the table is not linked to other database...

So Xen, my same question still continous...
So how can i transfer all the data into my table from the table in different database without looping but by using some SQL maybe and copy bulk info into my table in current database?:)

Thanks again.
 
Upvote 0
Try:

Code:
[COLOR="Blue"]INSERT INTO [/COLOR]Table1 [COLOR="Blue"]IN [/COLOR]'C:\SomeFolder\SomeDatabase.mdb'
    ( Field1, Field2, Field3 )

[COLOR="Blue"]SELECT [/COLOR]
    Table2.Field1, Table2.Field2, Table2.Field3

[COLOR="Blue"]FROM [/COLOR]
    Table 2;

It's not normal to have to use this kind of remote query very often. Consider if this could be done more simply by just linking your tables.
 
Upvote 0
Why not, without code, create a link to or import this table into the database?
 
Upvote 0

Forum statistics

Threads
1,214,591
Messages
6,120,428
Members
448,961
Latest member
nzskater

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top