Results 1 to 2 of 2
  1. #1
    combine21 is offline Advanced Beginner
    Windows 7 Access 2007
    Join Date
    Sep 2010
    Posts
    31

    PDF file

    I am wanting to be able to insert a link to a PDF file in some database entries in a form. Is this possible without making every entry a hyperlink?

  2. #2
    ketbdnetbp is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Midwest
    Posts
    254

    combine21 -

    Yes, you could try something like...

    Place a new Button on your form

    Then, in FORM'S, VBA Current Event, add -

    Private Sub Form_Current()

    'Add in your own error handling
    'Set PDF file Location variable
    dim st1 as string
    'If the file's location is in a field on your form, i.e. in recordsource
    st1 = Me![YourPDFFileLocationControl'sName]
    'then, Assign variable to button's HyperlinkAddress Property
    Me![YourButtonName].HyperlinkAddress = st1


    End Sub

    Thereafter, once you click the button, it should open the appropriate file.

    If the PDF's file location is not a field in the form's recordsource, let me know as there are several ways to put it into the stated variable.

    Hope this helps,

    Jim

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

Similar Threads

  1. Can I convert a access file to exe file?
    By zhshqzyc in forum Access
    Replies: 3
    Last Post: 01-25-2011, 09:49 AM
  2. Replies: 1
    Last Post: 09-27-2010, 10:10 AM
  3. Replies: 2
    Last Post: 03-02-2010, 12:02 PM
  4. Upload file inside .mdb database file
    By havish in forum Access
    Replies: 0
    Last Post: 07-30-2008, 07:35 AM
  5. How do you export a file with a unique file name
    By Budman42 in forum Import/Export Data
    Replies: 1
    Last Post: 10-15-2006, 06:10 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