Steve R.
Retired
- Local time
- Today, 14:00
- Joined
- Jul 5, 2006
- Messages
- 5,022
Is there a more efficient solution?
I am experimenting with how to import tables into a "developmental" database from my production database. The code copies from a table in the production database into a temporary table, then appends the data to the table OCRMQuestions, and then deletes the temporary table.
I was wondering if there was a way to directly import the data into the receiving table instead of using a temporary table?
Code:
Zap ("OCRMQuestions")
strSQL = "INSERT INTO OCRMQuestions Select * FROM tblTemporary"
strSourceTableName = "OCRMQuestions"
DoCmd.TransferDatabase acImport, "Microsoft Access", strSourceDBSName, acTable, strSourceTableName, "tblTemporary"
DoCmd.RunSQL strSQL, dbFailOnError
DoCmd.DeleteObject acTable, "tblTemporary"
I am experimenting with how to import tables into a "developmental" database from my production database. The code copies from a table in the production database into a temporary table, then appends the data to the table OCRMQuestions, and then deletes the temporary table.
I was wondering if there was a way to directly import the data into the receiving table instead of using a temporary table?