object name doesn't follow microsoft access object naming rules

C

Chuck W

Hi,
I have a database called DB1 on my local drive. I stored it at
C:\Databases\DB1. Our company has a G Drive which I have read/write access
to. There is a database located at G:\Database\Encounter.mdb. I can click
My computer, navigate to this database and open it.

I created a macro in DB1 where I am attempting to transfer a table called
tblEncounter from DB1 to the Encounter.mdb database. I used the
TransferDatabase function and filled out the correct information regarding
Transfer Type, Database Type etc. However, I am getting an error when I run
this stating that the object name G:\Database\Encounter.mdb doesn not follow
Microsoft Access's object naming rules. I made sure that that there were not
spaces in my path but am unsure why I am getting these errors. Can someone
help?

Thanks,
 
G

golfinray

You could try using the unc path, which would be
\\servername\foldername\filename or you could just import what you want from
one database to the other.
 
D

Dale Fye

It sounds like you left out the parameter telling Access one of the following:

Transfer type: acExport
Object type: acTable

Are you explicitly defining the parameters, or just providing them in a list
separated by commas? You might want to try it explicitly:

docmd.Transferdatabase TransferType:=acExport, _
DatabaseType:="Microsoft Access", _
Databasename:="G:\...", _
ObjectType:=acTable, _
Source:="tblEncounter", _
Destination:="tblEncounter"
 

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