Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6013815
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T02:36:12+00:00 2026-05-23T02:36:12+00:00

I am trying to create a button on my access form that allows for

  • 0

I am trying to create a button on my access form that allows for the user to view the corresponding page that goes with the data within the form (In this case, a part number is displayed on the form, and I want the button to open the Part Standard file to show the blueprint/diagram of said part)

I have tried using Adobe’s page parameters #page=pagenum at the end of my filepath, but doing this doesn’t work.

Here is the code I have (Basic, I know) but I’m trying to figure out where to go here. I have simple condensed down my filepath, for obvious reasons – Note: It’s not a URL, but a file path if this matters.

Private Sub Command80_Click()

    Dim loc As String 'location of file

    'loc = Me.FileLoc
    loc = "G:\*\FileName.pdf#page=1"

    Debug.Print loc
    'Debug.Print Me.FileLoc
    'Debug.Print Me.FileName

    Application.FollowHyperlink loc

End Sub

Is this possible to do this way? I will continue to read other users posts in hopes to find a solution, and I’ll note here if I do find one.

Thanks!

Update

I’ve found a way to do this, just I have 1 small complication now. My database will be accessed by many users, possibly with different versions of Acrobat, or different locations. Here is my working code:

Private Sub Command2_Click()

pat1 = """C:\Program Files\Adobe\Reader 9.0\Reader\AcroRd32.exe"""

pat2 = "/A ""page=20"""

pat3 = """G:\*\FileName.pdf"""

Shell pat1 & " " & pat2 & " " & pat3, vbNormalFocus

End Sub

Now, here is my concern. This code opens AcroRd32.exe from a specific file path, if my users have this stored elsewhere or have a different version, this won’t work. Does anyone have a suggestion as how to possibly get around this?

Thanks again! 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T02:36:13+00:00Added an answer on May 23, 2026 at 2:36 am

    The correct way to do this is probably to look up the location of the acrobat reader executable in the system registry. I find that’s generally more trouble than it’s worth, especially if I have some control over all of the places my program will be installed (within a single intranet, for example). Usually I end up using this function that I wrote:

    '---------------------------------------------------------------------------------------
    ' Procedure : FirstValidPath
    ' Author    : Mike
    ' Date      : 5/23/2008
    ' Purpose   : Returns the first valid path found in a list of potential paths.
    ' Usage     : Useful for locating files or folders that may be in different locations
    '               on different users' computers.
    ' Notes     - Directories must be passed with a trailing "\" otherwise the function
    '               will assume it is looking for a file with no extension.
    '           - Returns Null if no valid path is found.
    ' 5/6/11    : Accept Null parameters.  If all parameters are Null, Null is returned.
    '---------------------------------------------------------------------------------------
    '
    Function FirstValidPath(ParamArray Paths() As Variant) As Variant
    Dim i As Integer
    
        FirstValidPath = Null
        If UBound(Paths) - LBound(Paths) >= 0 Then
            For i = LBound(Paths) To UBound(Paths)
                If Not IsNull(Paths(i)) Then
                    If Len(Dir(Paths(i))) > 0 Then
                        FirstValidPath = Paths(i)
                        Exit For
                    End If
                End If
            Next i
        End If
    
    End Function
    

    The function takes a parameter array so you can pass it as many or as few paths as necessary:

    PathToUse = FirstValidPath("C:\Program Files\Adobe\Reader 9.0\Reader\AcroRd32.exe", _
                               "C:\Program Files\Acrobat\Reader.exe", _
                               "C:\Program Files (x86)\Acrobat\Reader.exe", _
                               "C:\Program Files\Acrobat\12\Reader.exe")
    pat1 = """" & PathToUse & """"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to create a list to return some JSON data to a view. Following
I am trying to create a button using CSS Gradients plus a icon that
i am trying to create an app. When user clicks on the button, it
I am trying to create a GUI that allows someone to set up an
I'm trying to create a custom control - a button - which will have
I'm trying to create a perfectly circular button, So I created a template from
I am trying create a WCF service that leverages the WPF MediaPlayer on the
Trying to create a user account in a test. But getting a Object reference
Trying to create my first iPhone app that would play back audio. When I
Trying to create a small monitor application that displays current internet usage as percentage

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.