Run-time error 2507

S

Sash

I have a form where the user will key in a number associated with a directory
structure for many CDs that contain a database that I need to import the
data. I was going to have a TEMP table so that eventually this form will
drop all records in TEMP, transfer the data and then run an append query to
the main table. However, I keep getting the above error when I try to run
this code. Any ideas?

Dim stDBName, stSource, stDestination As String

stDBName = "E:\" & Me!ProjNum & "\PROJECT\DATA.mdb"
stSource = "DB1"
stDestination = "TEMP"

DoCmd.TransferDatabase , , stDBName, acTable, stSource, stDestination, False
 
S

Sash

After a day of struggling, I figured it out and can't believe it.

OLD
DoCmd.TransferDatabase , , stDBName, acTable, stSource, stDestination, False

NEW
DoCmd.TransferDatabase , "Microsoft Access", stDBName, acTable, stSource,
stDestination, False

Yup "Microsoft Access" was all that was missing. Hope this helps someone
else!
 

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