I have been using this code below in a query and it works just fine.
any other way to revise the code to make it work?
I need the code to be in module level.
Kindly help me solve this code.
however when I use this on module level the above code does not work. it says syntax error. so I modified it below in the module..code:
INSERT INTO (;DATABASE=D:\files\Database2.accdb) table1 ( ID, Fn, Mn )
SELECT table1.ID, table1.Fn, table1.Mn
FROM table1 LEFT JOIN (;DATABASE=D:\files\Database2.accdb) table1 AS vDestination ON table1.ID = vDestination.ID
WHERE vDestination.ID Is Null;
still syntax error on From Clause;dim insertinto as string
insertinto = "INSERT INTO Table1 ( ID, Fn, Mn ) IN 'D:\rommelfiles\Database2.accdb' " _
& "SELECT Table1.ID, Table1.Fn, Table1.Mn " _
& "FROM Table1 LEFT JOIN table1 IN 'D:\rommelfiles\Database2.accdb' AS vDestination ON table1.ID = vDestination.ID" _
& "WHERE vDestination.ID Is Null;"
any other way to revise the code to make it work?
I need the code to be in module level.
Kindly help me solve this code.
Last edited: