Movin records from one table to another

  • Thread starter Thread starter filnigeria
  • Start date Start date
F

filnigeria

i want to copy the whole of one table (which is a temporary one) to the main
table
i want to do this before i delete the temporary tables
i have the delete scripts and all that all i need is how to move them before
i delete them
 
I like to use the RunSQL approach for this:

Dim strSQL as String
strSQL = "INSERT INTO tblReceiver SELECT * FROM tblSource"
DoCmd.SetWarning False
DoCmd.RunSQL strSQL
DoCmd.SetWarnings True

The SetWarnings commands eliminate the need for the user to approve the insertion of records into the table.
 
The SetWarnings commands eliminate the need for the user to approve
the insertion of records into the table.

Using the db.Execute is safer and gives better error handling too.


Tim F
 
Back
Top