Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Export or FileCopy files from Access 2003 to Sharepoint Server

Posted on 2013-05-31
6
Medium Priority
?
543 Views
Last Modified: 2013-08-15
Is it possible to transfer files from Acccess 2003 VBA that will either export or Filecopy a zipfile or datafiles from an Access 2003 mdb to a Sharepoint server.

First I would like to know if this is possible and I am looking for sample code.

the following will work on Windows 7, but not on an XP box.

Call FileCopy("R:\Access\Development\Gina\Automated\STA RSprositUpdate\DocumentsMissingStatus.xls", "http://collaboration.organon.intra/sites/GCORM_Business_Analysis/Sample BARP Process Site/SCBM STARS Test/DocumentsMissingStatus.xls")
__________________________________________________________

Part 2:

The file I need to save would be the daily run of agroup of files (.zip) that would include the current date.  As part of the validatation process I would like to validate the last file in the Sharepoint and retrieve all zip files from that date to present from the specified file location.  What would be the best approach to Look for the Max(Created Date) for the particular file name, and create a multifile upload process automatically.

Is there another workaround?

Thanks,

Karen
0
Comment
Question by:Karen Schaefer
  • 3
  • 2
6 Comments
 
LVL 14

Expert Comment

by:Bill Ross
ID: 39218602
Hi,

Try the code without the http in the destination like below.

Call FileCopy("R:\Access\Development\Gina\Automated\STA RSprositUpdate\DocumentsMissingStatus.xls", "//collaboration.organon.intra/sites/GCORM_Business_Analysis/Sample BARP Process Site/SCBM STARS Test/DocumentsMissingStatus.xls")

I don't understand Part 2.  Are you trying to copy from the R to SharePoint or from SharePoint.  Perhaps split this out to a separate question.

Regards,

Bill
0
 

Author Comment

by:Karen Schaefer
ID: 39219524
Thank you for for your input, however, removing the HTTP portion did not return an filecopy of the zip file uploaded to the Correct directory in SharePoint.

Disregard part 2.

I need to be able to Upload a zip file into SharePoint via VBA code, is it possible?  I am looking for code that will automate the Upload process from MS Access 2003 to a Sharepoint Location.

Karen
0
 
LVL 14

Expert Comment

by:Bill Ross
ID: 39219612
Hi,

...the following will work on Windows 7, but not on an XP box.

Call FileCopy("R:\Access\Development\Gina\Automated\STA RSprositUpdate\DocumentsMissingStatus.xls", "http://collaboration.organon.intra/sites/GCORM_Business_Analysis/Sample BARP Process Site/SCBM STARS Test/DocumentsMissingStatus.xls")

If so then try removing the http and reversing the // like:

Call FileCopy("R:\Access\Development\Gina\Automated\STA RSprositUpdate\DocumentsMissingStatus.xls", "\\collaboration.organon.intra\sites\GCORM_Business_Analysis\Sample BARP Process Site\SCBM STARS Test\DocumentsMissingStatus.xls")

Regards,

Bill
0
 
LVL 14

Accepted Solution

by:
Bill Ross earned 2000 total points
ID: 39219636
more...

If that does not work then you will need to determine the correct SharePoint virtual  "folder".

Contact your SharePoint admin.  

On our server the upload folder is:

\\servername\DavWWWRoot\Uploads  (which works fine in the above code)

The http equivalend is:

http://servername/Uploads/

Which does not work.

Regards,

Bill
0
 

Author Closing Comment

by:Karen Schaefer
ID: 39412019
Thanks.,
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
In a use case, a user needs to close an opened report by simply pressing the Escape (Esc) key. This can be done by adding macro code in Report_KeyPress or Report_KeyDown event.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question