Results 1 to 7 of 7
  1. #1
    2 Star Lounger
    Join Date
    Mar 2002
    Posts
    164
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Form PDF Link (2003)

    Here is my issue. I have a form in which a user searches for a specific purchase order, and I then display all the pertinent information in a form. I have a directory on my server which we store PDF copies of our purchase orders. The PDF's are named the same as the purchase order number (i.e. if a user has po number 123456 open in my Access form, the pdf is named 123456.pdf on the server. Is it possible to link to this in my Access form? So whatever PO is open, the link would point to that individual PDF.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Form PDF Link (2003)

    You can create a hyperlink to the PDF file: take any label, text box, command button, etc. on the form and use the On Current event of the form to set its hyperlink address property:

    Private Sub Form_Current()
    If IsNull(Me.PONum) Then
    ' Disable hyperlink
    Me.lblSomething.Hyperlink.Address = ""
    Else
    ' Set hyperlink
    Me.lblSomething.Hyperlink.Address = "C:PDF" & Me.PONum & ".pdf"
    End If
    End Sub

    Substitute the correct names and path.

  3. #3
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Form PDF Link (2003)

    You can also use the FollowHyperlink method in the On-Click event of a command button, with code something like:

    Application.FollowHyperLink "server..etc..." & txtPOnum & ".pdf"
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  4. #4
    2 Star Lounger
    Join Date
    Mar 2002
    Posts
    164
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Form PDF Link (2003)

    Hi Hans,

    It appears the code is working, but the PDF doesn't stay loaded. It pops up for a second and disappears.

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Form PDF Link (2003)

    That is probably not an Access problem - hyperlinks are handled by the system, not by Access. Can you open PDF files directly?

  6. #6
    4 Star Lounger
    Join Date
    Jun 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    527
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Form PDF Link (2003)

    This is my problem as well. But I am running the DB in terminal mode using Citrix. I am searching for an answer and will report back with a solution.


    Thanks,
    Mark

  7. #7
    2 Star Lounger
    Join Date
    Mar 2002
    Posts
    164
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Form PDF Link (2003)

    (Edited by HansV to make URL clickable - see <!help=19>Help 19<!/help>. A link is very easy to create and much more user-friendlly)

    I found the solution...

    http://support.microsoft.com/default.aspx?...kb;en-us;897755

    I downloaded the appropriate Adobe update, and restarted Access. Everything is working fine now. Let me know if this solves your problem. If not, I'll do some more research.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •