0

Below code is working well.

Public Function exportCSV()
DoCmd.TransferText acExportDelim, , "Demographics", C:\Users\Documents\Demographics.csv"
End Function

But I want the file to be exported to SharePoint Folder instead locally. I tried using the SharePoint folder path but whenever I run, it gives me this 2825 error: The file does not exist, or you do not have read access to the file. I have access to the SharePoint but I am not sure why this error comes. Please anyone could explain. Any help would be appreciated.

2
  • Is your Sharepoint path using https or UNC reference? Review stackoverflow.com/questions/50510770/… Commented Feb 8, 2022 at 10:57
  • @June7 Yes, it is using https. Thank you for the link, I will look at it. Commented Feb 8, 2022 at 14:35

1 Answer 1

0

The only thing that has worked for us is to use the following: C:\Users[USERDIR][COMPANY SHAREPOINT][SHAREPOINT DIR] - [LIBRARY NAME]. I've made it a variable in ACCESS VBA by setting a variable to Environ$("USERNAME"). Here is a listing of all ENVIRON variables..https://www.geeksengine.com/article/ms-access-environ-function.html

Keep in mind that there is a 256 char limit on the string used.

Good Luck!

Sign up to request clarification or add additional context in comments.

1 Comment

As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.