FileCopy

R

Rick

From a totally separate mdb, I can use FileCopy to copy a
some mdb's but not others. Some work fine, others give
a "Compile Error", "Expected Variable or procedure, not
project" message.

This is what I have been using:
FileCopy "C:\Program Files\SSM\SSM.mdb", "C:\Program
Files\SSM\Backup.mdb"

Actually the one that is important to me to back up is a
split mdb. The mdb with the tables is the only one that I
need to backup, if that makes any difference.

What syntax should I be using? Thanks, Rick
 
T

TC

If you use the FileCopy statement from database 'a' to copy database 'b',
there is no way that anything in database 'b' can cause an error with the
filecopy statement in database 'a'.

Post an exact copy of the actual filecopy statement that is failing, and the
exact error that occurs.

HTH,
TC
 
D

Dan Artuso

Hi,
What's the name of the db you're using?
You usually get this error when your mdb file has the same
name as a function within it. For example, I recently was testing
out a ping function (named 'ping') but I had named my mdb, ping,
and sure enough Access complained with that error.
 
T

TC

You are surely not saying that using the FileCopy statement to copy a
database named "ping" would cause an error?

TC
 
D

Dan Artuso

No, I'm saying he might have a function in there that's the same name as his mdb.
 
T

TC

But he is saying that if he copies one db it works, & if he copies another
db it does not work!
From a totally separate mdb, I can use FileCopy to copy a
some mdb's but not others. Some work fine, others give
a "Compile Error", "Expected Variable or procedure, not
project" message.

The problem description does not make any sense to me.

TC
 

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