create a copy of a linked sql server table in Access

W

wk6pack

Hi,

I have some code to create a backup copy of the data of my table. Now I
moved the table to SQL Server. I still need to create a backup copy of the
original table.

The following code, doesnt seem to work.
DoCmd.CopyObject , "Class Size data (SIZE version1)" & Format(Now,
"mmm_dd_yyyy_hh:mm:ss"), acTable, "Class Size data (SIZE version1)"

Run-time error "3709": The search key was not found in any record.

I've got a primary key in SQL Server. I can see the data from access.

Can I not create a copy of the linked table?

thanks,
Will
 
R

Roger Carlson

This seems like a very wasteful process, especially given the horsepower of
SQL Server. If your tables were getting so big that you had to split them
by day, I guess I can see it, but this should not be an issue with SQL
Server. Unless there is something I don't understand, you should just leave
the data in one table (or multiple related tables, as the case may be) and
differentiate the records by date in queries or views.
 
D

david epsom dot com dot au

docmd.runsql "select * into " & xTableName & " from " & yTableName
 

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