Copy a table from one database to another

S

SHIPP

I have 3 databases. Database A(the third database) has the VB to copy a table
from table B to table C.

I want to copy the table RATING from HRPDataMaster.mdb (table B)

'K:\SUPPLY\Finance Cust
Serv\MikeShippsDocumentation\HRP-CarolynLee\HRPDataMaster.mdb

to HRPDataTemplate.mdb (table C)

'K:\SUPPLY\Finance Cust
Serv\MikeShippsDocumentation\HRP-CarolynLee\HRPDataTemplate.mdb'


The following code contained in table A does not work

Public Function HrpReplicate()

Dim db As DAO.Database
Dim strSQL As String


strSQL = "Select * into tbl1 in 'K:\SUPPLY\Finance Cust
Serv\MikeShippsDocumentation\HRP-CarolynLee\HRPDataTemplate.mdb'" _
& "From rating in 'K:\SUPPLY\Finance Cust
Serv\MikeShippsDocumentation\HRP-CarolynLee\HRPDataMaster.mdb'"
db.Execute strSQL

end function

Any ideas on what I should do?
 

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