K
Kitty
I am trying to use code to transfer a table from an
external database into the current database. Both are
Access databases.
This is the code I'm using...
DoCmd.TransferDatabase _
TransferType:=acImport, _
DatabaseType:="Microsoft Access", _
DatabaseName:=TransferDrive, _
ObjectType:=acTable, _
Source:="tblSample"
Where TransferDrive is the path and name of the database.
The actual name of the database is always the same; the
path may differ which is why I'm using a variable. I've
dried feeding just the drive as a variable with & to add
it to the database name, and that errors out as well.
With this code, I receive this error - The object name "
you entered doesn't follow Microsoft Office Access object-
naming rules.
TransferDrive is dimmed as a string, so shows "" around it
when I put my cursor on the field.
Thanks for your help.
Kitty
external database into the current database. Both are
Access databases.
This is the code I'm using...
DoCmd.TransferDatabase _
TransferType:=acImport, _
DatabaseType:="Microsoft Access", _
DatabaseName:=TransferDrive, _
ObjectType:=acTable, _
Source:="tblSample"
Where TransferDrive is the path and name of the database.
The actual name of the database is always the same; the
path may differ which is why I'm using a variable. I've
dried feeding just the drive as a variable with & to add
it to the database name, and that errors out as well.
With this code, I receive this error - The object name "
you entered doesn't follow Microsoft Office Access object-
naming rules.
TransferDrive is dimmed as a string, so shows "" around it
when I put my cursor on the field.
Thanks for your help.
Kitty