Results 1 to 3 of 3
  1. #1
    mpeeples is offline Novice
    Windows 7 64bit Access 2003
    Join Date
    Nov 2012
    Posts
    2

    Let user change file path to program called by script


    hi all,

    I'm currently creating a database and Access form setup to be used for data entry by a number of people who are not necessarily familiar with many aspects of Access.

    The database I'm creating is a basic relational database with fields from several tables to be entered into a single tabbed form. Each record will also be attached via a hyperlink to a specific page in a PDF file. I've created a script associated with a button in the form that automatically opens the correct PDF to the correct page in Adobe Acrobat reader (PDF file is selected by user using a FileDialog and page number is entered manually). Anyway, part of the script that call Adobe Acrobat requires that the absolute file path be included. This may change as users install new versions of Acrobat or move the database to a new computer. I was wondering if anyone had any suggestions on how I might allow users to select the location of Adobe Acrobat in the event that it changes, but in a way that does not require them to open the code editor. My current thought was to have a button that allowed them to browse to a file location using the FileDialog and to have that set the default value in the form, but I'm not sure how to do this so that the value would be change the value for all previous records. I'm relatively new to Access myself so I may be missing something obvious.

    Any suggestions?

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,964
    "but I'm not sure how to do this so that the value would be change the value for all previous records"

    You do or do not want the value changed for all previous records?

    User navigates to the PDF to save path/name in a hyperlink field in table?

    Then you have code for users to later open the PDF from the hyperlink field?

    For alternative to hyperlink field, review http://allenbrowne.com/func-GoHyperlink.html

    To edit hyperlink, Google: Access VBA edit hyperlink
    http://www.access-programmers.co.uk/...d.php?t=101286
    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
    mpeeples is offline Novice
    Windows 7 64bit Access 2003
    Join Date
    Nov 2012
    Posts
    2
    Man, I must have been exhausted when I wrote this post yesterday. It didn't make much sense.

    Anyway, I figured out what I needed to do. All I did was create a text box on the form that isn't tied to any variable in any table. When a user updates the text box field, it changes for every record (which is what I wanted).

    I have users navigate to the PDF file with a FileDialog and enter the relevant page number. The reason I used a separate button to open the PDF to the correct page number is that a hyperlink can't open a local PDF to a specific page without a call to another routine (though a online pdf can).

    Thanks for the on GoHyperlink. That will be useful for other things I'm doing with this database.

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

Similar Threads

  1. Path change
    By dref in forum Access
    Replies: 5
    Last Post: 09-03-2012, 08:41 AM
  2. Replies: 3
    Last Post: 07-30-2012, 02:16 PM
  3. Replies: 10
    Last Post: 03-04-2012, 12:17 AM
  4. Replies: 1
    Last Post: 05-10-2011, 08:31 PM
  5. open access 2007 only when called by executable file
    By rommelgenlight in forum Access
    Replies: 1
    Last Post: 01-20-2010, 12:50 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