copy record between tables

A

Alberto

Hi,
I have two tables with same structure. I need to copy a record from one
to other using vba codes. I'd like avoid to copy field to field.

Thank you.
 
B

Bill Edwards

Without knowing anything about your table structures, something similar to
the following:

Dim strSQL As String
strSQL = "INSERT INTO tblCopy SELECT tblOriginal.* " _
& "FROM tblOriginal WHERE tblOriginal.KeyValue = 4"
CurrentProject.Connection.Execute strSQL
 

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