Thanks Thanks:  0
Likes Likes:  0
Results 1 to 5 of 5

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

  1. #1
    Board Regular pedie's Avatar
    Join Date
    Apr 2010
    Location
    INDIA
    Posts
    3,875
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

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

    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
    Regards,
    Pedie
    MS OFFICE 2016/EXCEL 2016: Window7: 64BIT
    Visit YouTube.com/VBAa2z


  2. #2
    MrExcel MVP
    Moderator
    xenou's Avatar
    Join Date
    Mar 2007
    Location
    Clev. OH, USA
    Posts
    15,897
    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)

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

    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.

    Using: Office 2010/Win7 (work) Office 2010/Win7 (home)

    You are rich in proportion to the number of things you can let alone.
    -- Henry David Thoreau

  3. #3
    Board Regular pedie's Avatar
    Join Date
    Apr 2010
    Location
    INDIA
    Posts
    3,875
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

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

    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
    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.
    Regards,
    Pedie
    MS OFFICE 2016/EXCEL 2016: Window7: 64BIT
    Visit YouTube.com/VBAa2z


  4. #4
    MrExcel MVP
    Moderator
    xenou's Avatar
    Join Date
    Mar 2007
    Location
    Clev. OH, USA
    Posts
    15,897
    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)

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

    Try:

    Code:
    INSERT INTO Table1 IN 'C:\SomeFolder\SomeDatabase.mdb'
        ( Field1, Field2, Field3 )
    
    SELECT 
        Table2.Field1, Table2.Field2, Table2.Field3
    
    FROM 
        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.

    Using: Office 2010/Win7 (work) Office 2010/Win7 (home)

    You are rich in proportion to the number of things you can let alone.
    -- Henry David Thoreau

  5. #5
    Board Regular Norie's Avatar
    Join Date
    Apr 2004
    Location
    Stirling, Scotland
    Posts
    73,725
    Post Thanks / Like
    Mentioned
    24 Post(s)
    Tagged
    0 Thread(s)

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

    Why not, without code, create a link to or import this table into the database?
    If posting code please use code tags.

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •