Movin records from one table to another

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
 
T

TomU

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.
 
T

Tim Ferguson

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top