Run-time error 2507

  • Thread starter Thread starter Sash
  • Start date Start date
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
 
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!
 
Back
Top