VBA.FileCopy

  • Thread starter Kindergarten Teacher
  • Start date
K

Kindergarten Teacher

I am receiving "vba filecopy 75 path/file access error" when I try to use any
kind of a copy command inside of vba for Access 2002. The Visual Basic
version is 6.3

Here is a simplified version of the code.

MkDir "C:\To"
filepicked = "C:\From\test.txt"
directorypicked = "C:\To"
VBA.FileCopy filepicked, directorypicked

I have no problem creating the new directory using this code.

The file exists and the path is correct.
After each attempt the "To" directory was removed so it could be successfully
recreated.

There doesn't seem to be permission problems. I can run a copy command at a
DOS prompt and successfully copy the file to the new directory.

I have the path variables declared as strings - I've also tried as variants

When run in my application the code does create the "To" directory but gives
the error 75 message when it tries to copy the file to the new directory.
 
J

John Nurick

From the FileCopy help topic:

destination: Required. String expression that specifies the target
file
name. The destination may include directory or
folder, and drive.
 
K

Kindergarten Teacher

Face is red. It was so simple I missed it.

I was thinking the destination merely had to be the path to the directory -
as you would in Unix.
Know I know that you must specific the name of the file in the destination as
well.

Tried it out in my simple test on the C drive and it worked. Now I need to
set it to work on the network drives

John, you get a gold star for your forehead.

John said:
From the FileCopy help topic:

destination: Required. String expression that specifies the target
file
name. The destination may include directory or
folder, and drive.
I am receiving "vba filecopy 75 path/file access error" when I try to use
any
[quoted text clipped - 25 lines]
gives
the error 75 message when it tries to copy the file to the new directory.
 
J

John Nurick

Thank you for the gold star. Do all kindergarten teachers know Unix?

Face is red. It was so simple I missed it.

I was thinking the destination merely had to be the path to the directory -
as you would in Unix.
Know I know that you must specific the name of the file in the destination as
well.

Tried it out in my simple test on the C drive and it worked. Now I need to
set it to work on the network drives

John, you get a gold star for your forehead.

John said:
From the FileCopy help topic:

destination: Required. String expression that specifies the target
file
name. The destination may include directory or
folder, and drive.
I am receiving "vba filecopy 75 path/file access error" when I try to use
any
[quoted text clipped - 25 lines]
gives
the error 75 message when it tries to copy the file to the new directory.
 
K

Kindergarten Teacher via AccessMonster.com

Don't think so, but they should.

I started out programming on the Atari (ignoring your snickers) . It was a
great machine for my needs. Lots of color, sound, and fast animation. I made
a lots of programs for the children to use. The students in my class
consistently finished the school well ahead of their peers.

Sadly, I saved the programs on cassette tapes and with a thermal printer.
They are all gone now.

I went back to school to get another BS in Computer Science, where I learned
Unix. I'm not teaching at the moment because I need money that I wasn't
getting in teaching; but I'm looking forward to going back. But not to the
public school system.

Computers are fun and challenging but teaching is much more fun and much,
much more challenging.

Thanks again,
Wayne

John said:
Thank you for the gold star. Do all kindergarten teachers know Unix?
Face is red. It was so simple I missed it.
[quoted text clipped - 20 lines]
 

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