Writing a recordset to a table

C

CeeKay

I have generated a recordset using an SQL string and I want to write the
records to a new table. I can do it by writing one record at a time but is
there a way of writing all the records at once?
 
S

Steve Schapel

CeeKay,

Just for clarity, as an aside, let me forst say that this is not an Access
macro question, as you can not generate a recordset using a macro.

Now, if you want to write records to a table, and the records can be defined
by an SQL string, then you probably don't need a recordset anyway, so can
bypass this step. Just modify your SQL string so it is an Append Query or
Make-Table Query, rather than a Select Query, and then use the
CurrentDb.Execute method in your VBA procedure to run it.

If you need more explicit advice, please post the SQL string you have so
far, plus the details of the table you want to write the data to.
 

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