Use Access vba to move file from share to sharepoint

  • Thread starter rfuscjr via AccessMonster.com
  • Start date
R

rfuscjr via AccessMonster.com

I have a MsAccess button that essentially, when pressed, runs a bunch of
queries, builds tables, opens an Excel file linked to those tables, refreshes
all and writes to a share (Ex: x:\CompanyReports\Counts\mycounts.xls.

Now they want the file to appear on our shaprepoint websites as well (along
with a bunch of other files) I want to use the MSAccess vba to move files
from the share to sharepoint BUT, using this code:
'SourceFile = "X:\LVPG\Reports\MISC\LVPG_FM_wRVUDetails.xls"
'DestinationFile = "\\myreports\groups\Internal_Medicine\wRVUs\Detail\
LVPG_wRVUDetails.xls"
'FileCopy SourceFile, DestinationFile

I get an error...it appears you can not use a URL and I know of no other way
to move the files...thoughts...
 
D

Douglas J. Steele

What's the error you're getting?

You can use UNCs (which is what you're showing), although you can't use URLs
 
R

rfuscjr via AccessMonster.com

its a funny number...nothing I can find info on but I did determine that you
are correct about the URLs....any ideas on how to get around this...?
Douglas said:
What's the error you're getting?

You can use UNCs (which is what you're showing), although you can't use URLs
I have a MsAccess button that essentially, when pressed, runs a bunch of
queries, builds tables, opens an Excel file linked to those tables,
[quoted text clipped - 13 lines]
way
to move the files...thoughts...
 
D

Douglas J. Steele

So what IS the "funny number"?

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


rfuscjr via AccessMonster.com said:
its a funny number...nothing I can find info on but I did determine that
you
are correct about the URLs....any ideas on how to get around this...?
Douglas said:
What's the error you're getting?

You can use UNCs (which is what you're showing), although you can't use
URLs
I have a MsAccess button that essentially, when pressed, runs a bunch of
queries, builds tables, opens an Excel file linked to those tables,
[quoted text clipped - 13 lines]
way
to move the files...thoughts...
 
D

Douglas J. Steele

That's usually indicative of improper permissions.

You sure you have permission to write to the destination share and to read
from the source share?

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


rfuscjr via AccessMonster.com said:
I get this:

Run Time error 75
Path/File access error
So what IS the "funny number"?
its a funny number...nothing I can find info on but I did determine that
you
[quoted text clipped - 9 lines]
way
to move the files...thoughts...
 
R

rfuscjr via AccessMonster.com

yes, If I open the file and so a save as and paste in the URL...it works.
That's usually indicative of improper permissions.

You sure you have permission to write to the destination share and to read
from the source share?
I get this:
[quoted text clipped - 8 lines]
 
R

rfuscjr via AccessMonster.com

yes, If I open the file and so a save as and paste in the URL...it works.
That's usually indicative of improper permissions.

You sure you have permission to write to the destination share and to read
from the source share?
I get this:
[quoted text clipped - 8 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