Help! How to code an Importing a SQL Tables to Access 2003

  • Thread starter Thread starter Mike B
  • Start date Start date
M

Mike B

My problem is trying to figure out if this can be done and if so code or
macro to run automatically daily.

I use 5 tables in a SQL database. I can't link these table because when I
run my queries it slows down the entire system. So to get around this I
just imported the 5 tables into my Access database. The only problem is
these table are up-dated weekly so I need to up-date my table weekly. I can
do this manually but would rather automate it.

Is there a way to create code that will run and just import the specific
tables I need from SQL database.

Here is the sql specifics,

Server - PartsRelease
Login - buck
Password - passing
Tables needed - dbo_tblparts1, dbo_tblparts2, dbo_tblparts3, dbo_tblparts4,
and dbo_tblparts5.

Once I get them imported to Access, I want to overwrite to old same named
tables with the newly imported tables.

Is it possible to do this and how.

Thanks in advance for all who help.

Mike
 
You should be able to link to them, run a Make Table query based on the
linked table, then delete the linked table.

The TransferDatabase method should let you create the the linked tables (or
you should be able to modify the code in
http://www.accessmvp.com/DJSteele/DSNLessLinks.html to make DSN-less linked
tables)

The Make Table queries can reside in the database even if the linked tables
have been deleted.
 
Doug,

Thanks, I was over complicating the problem, and to your point should have
used Make-Table. I just wrote a query and macro and this works fine. I
will also check out the Transfer Database method.

Thanks again for your help,
Mike

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
Back
Top