iymanb
asked on
Is there a VBA code to let export a query from MS ACCESS file, export it as a TABLE to another MS ACCESS file ?
Is there a VBA code to let export a query from MS ACCESS file, export it as a TABLE to another MS ACCESS file ?
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
No need for VBA code
Do as described here
https://support.office.com/en-us/article/export-a-database-object-to-another-access-database-4e2cd6dd-e482-441e-88b5-aa5319a428a6
Do as described here
https://support.office.com/en-us/article/export-a-database-object-to-another-access-database-4e2cd6dd-e482-441e-88b5-aa5319a428a6
ASKER
Your answers where good ;
But this post has some clearer code :
https://stackoverflow.com/questions/42528479/access-copy-result-of-query-into-table-with-vba?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa
But this post has some clearer code :
https://stackoverflow.com/questions/42528479/access-copy-result-of-query-into-table-with-vba?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa
ASKER
The lines of VBA code you provided were really helpful , Thank you
ASKER
This is fine, creating a TEMP table, then exporting is fine.
To create a temp table, isn't there a VBA code to replicate an existing query directy into a table, as the SQL statement is lengthy; and is difficult to put inside VBA code