Results 1 to 3 of 3
  1. #1
    tmcrouse is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Apr 2009
    Posts
    169

    Form Command Button to .pdf on Sharepoint

    I attempted to program my command button on the click event to open a hyperlink on a sharepoint that has a document, a .pdf. When I attempt to click the button I get the following error: runtime error 2465 microsoft access cannot find the field '1|' referred to in your expression




    This is the code I have:
    Code:
    Private Sub Command4_Click()
    Me.[https://collaborate.wp.com/sites/ClinicalQuality/Shared%20Documents/CQMIGlossary.pdf].SetFocus
    RunCommand acCmdImportAttachSharePointList
    End Sub
    I have also tried runcommand accmdinsserthyperlink
    runcommand accmdviewdetails

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,648
    Perhaps need to use FollowHyperlink method.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    tmcrouse is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Apr 2009
    Posts
    169
    AWESOME. This worked:

    Code:
    Private Sub Command4_Click()
    Application.FollowHyperlink "https://collaborate.wpoint.com/sites...MIGlossary.pdf", True
    
    End Sub

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 08-04-2013, 07:11 AM
  2. Filter form with command button
    By NISMOJim in forum Forms
    Replies: 6
    Last Post: 10-22-2011, 02:29 AM
  3. Replies: 1
    Last Post: 07-27-2010, 02:27 PM
  4. Export Command Button in Form
    By jjmartinson in forum Forms
    Replies: 3
    Last Post: 08-25-2009, 01:28 AM
  5. Adding Command Button To Form
    By uneek78 in forum Forms
    Replies: 7
    Last Post: 03-27-2009, 07:43 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums