Link to home
Start Free TrialLog in
Avatar of urjudo
urjudoFlag for United States of America

asked on

Access Database - view document in Access database from Sharepoint

Hi Experts,
Is anyway I can view documents in Access database from Sharepoint site?  I know I can use link to link from sharepoint in Access database but it's only create a table in Access, what I want is to be able to view that document(s) in Access Database from Sharepoint that is associate with the case#.  (for example, I have document c#1234567 save in Sharpoint and I when I opne c#1234567 in Access database, I can able to view this document which save in sharepoint)
i'm using office 365 Access 2016
Thanks,
ASKER CERTIFIED SOLUTION
Avatar of Jim Dettman (EE MVE)
Jim Dettman (EE MVE)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of urjudo

ASKER

@Jim,
I was able to view the document(s) that save in the network in Access Database but don't how to view it from Sharepoint

SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Sorry, I lost track of this.

<<I was able to view the document(s) that save in the network in Access Database but don't how to view it from Sharepoint >>

 I'm a little confused; you want to be in Access and viewing documents stored in Sharepoint?    or you want to be in Sharepoint and viewing documents stored in an Access DB?

Jim.
Avatar of urjudo

ASKER

@John & Jim,
Yes, I store documents in Sharepoint and would like to be able to view them in Access.  But don't know how to point to the sharepoint location.  I currently store documents in a different network drive and I'm able to point to it by using(here is my code for the current view document from Network drive):
Private Sub Form_open(cancel as Integer)
  Dim HoldDate as String
  Dim hold year as string
 Dim FileName as string
 Dim ControlCount As Integer
Dim GetControlName as string

 HoldDate = Format(Form_frmAccount.acctDate,"mm") & "-" & format(FOrm_frmAccount.acctDate, "dd") & "-" format(Form_acctDate, "yy")
 HoldYear = Format(Form_frmAccount.acctDate, "yyyy")

stFileName = Dir("Z:\AccountFiles\" & HoldYear & "\" & HoldDate & "\" & Form_frmAccount.acctNum & "*.pdf")
Me(1).Caption = stFileName
Me(1).HyperlinkAddress = "Z:\AccountFiles\" & HoldYear & "\" & HoldDate & "\" & stFileName
ControlCount = 2

stFileName = Dir
Do Until stFileName = ""
    Me(controlCount).Caption = stFileName
   Me.(ControlCount).HyperlinkAddress = "Z:\AccountFiles\" & HoldYear & "\" & HoldDate & "\" & stFileName
   ControlCount = ControlCount +1
    stFileName = DIr
Loop
End Sub

This code is able to view the documents in Access and I create a Current Year Folder and create a folder for each day inside the Year folder.  But I don't know how to do that if I need to view Documents in that store in Sharepoint.

Thanks both!

 I don't have SharePoint at the moment to try it, but if you are already using the hyperlink method with other drives, I don't understand why going to sharepoint would be any different.

 Are you looking for the list of documents, or getting the actual content?

Jim.
Avatar of urjudo

ASKER

@jim,
so the means I should use hyperlink address and add the sharepoint site address? like:
 Me.(ControlCount).HyperlinkAddress = "nameofthesharepointlnk:\AccountFiles\" & HoldYear & "\" & HoldDate & "\" & stFileName
something like this?
Avatar of urjudo

ASKER

I have tried:
Dim stFileSite as String
Dim  stFolderPath as String
stFileSite = "https://mycompany.sharepoint.com/sites/mis"
stFolderPath = "/share documents/development/Account Info"

me.viewdoc.hyperlinkaddress = stFilName & stFolderPath
but it's open a blank page, I couldn't figure out what i missing.

I also tried me.viewdoc.haperlinkaddress = "https://mycompany.sharepoint.com/sites/mis/share documents/development/Account Info"  -- > this way doesn't even open.
 
I've been trying to dig into this a bit, but I'm hamstrung by the fact that I don't have SharePoint available to me at the moment.

The link as you did it should work and I don't know why it does not.

It's been sometime though since I've worked with SharePoint and a lot has changed, so I may not be thinking of this correctly.

 I'll see if I can't find someone that can answer this.

Jim.
Avatar of urjudo

ASKER

@Jim,
Thank you so much for your respond and your patience as always!  I'm really appreciated! As i keep searching on the google about this issue.  It works fine if I just open the site but if I added the folder path then it gave me a blank page. 
Avatar of urjudo

ASKER

@jim,
Thanks for your helped.  I think I figure it out why it opens a blank page .  It was because I did not open my outlook email and the SharePoint is inside the outlook.  silly me.  But thanks for all your advise!
Avatar of urjudo

ASKER

@Jim & John,
Thanks so much for all your helped and advise.  I'm very appreciated to you both as always!  take care.