none
Pre fixed location for Hypelink entry RRS feed

  • Question

  • Hi,

    Some of My form has hyperlink to document in harddisk.

    for each form a different folder is there in hard disk.

    My Objective : In entry form , when a person tries to insert an address in hyperlink field (by clicking right button on it and select "edit hyperlink")  specific location appears in "Insert Hyperlink" window place of default location (like folder: D:\Data\Customer  in place of default location i.e. folder where database is saved)

    Thanks

    Sunday, July 19, 2015 4:33 PM

Answers

  • Hi,

    As Tom said, I am not sure if there's a registry hack that you can use to do something like that. However, one workaround might be is to provide your own button for modifying the hyperlink. You can then use VBA or API to send the user to a default location and after they select a file, your code can update the hyperlink with the file they selected.

    Just a thought...

    Sunday, July 19, 2015 4:56 PM
  • Hi Ashish,

    Just open an Open File dialog box and populate it with your default path, allow the user to select the file, then test the returned string to see it this is acceptable to you and save this to the the Hyper link.

    Set fd = Application.FileDialog(1)
    Fd.InitialFileName = "D:\Data\Customers"
    ... 


    Brian, ProcessIT- Hawke's Bay, New Zealand


    • Edited by ProcessIT Sunday, July 19, 2015 9:24 PM typo error
    • Marked as answer by AshishKumar1200 Tuesday, July 21, 2015 2:20 PM
    Sunday, July 19, 2015 9:24 PM
  • Hi. After you get the file's path and name, you can assign it to the field. For example:

    Me.FieldName = "#" & strFilePath

    That assumes strFilePath contains the value you got from the FileDialog object after the user browsed to the file they selected.

    Hope that helps...

    Monday, July 20, 2015 8:00 PM

All replies

  • Sorry, no, there is no built-in way to do that.

    -Tom. Microsoft Access MVP

    Sunday, July 19, 2015 4:43 PM
  • Hi,

    As Tom said, I am not sure if there's a registry hack that you can use to do something like that. However, one workaround might be is to provide your own button for modifying the hyperlink. You can then use VBA or API to send the user to a default location and after they select a file, your code can update the hyperlink with the file they selected.

    Just a thought...

    Sunday, July 19, 2015 4:56 PM
  • Hi Ashish,

    Just open an Open File dialog box and populate it with your default path, allow the user to select the file, then test the returned string to see it this is acceptable to you and save this to the the Hyper link.

    Set fd = Application.FileDialog(1)
    Fd.InitialFileName = "D:\Data\Customers"
    ... 


    Brian, ProcessIT- Hawke's Bay, New Zealand


    • Edited by ProcessIT Sunday, July 19, 2015 9:24 PM typo error
    • Marked as answer by AshishKumar1200 Tuesday, July 21, 2015 2:20 PM
    Sunday, July 19, 2015 9:24 PM
  • Hi,

    I Used your idea it works fine for me.

    Now i have address of file to enter in hyperlink.  But, please also help me to use this address in bound hyperlink field as address.

    Monday, July 20, 2015 4:51 PM
  • Hi. After you get the file's path and name, you can assign it to the field. For example:

    Me.FieldName = "#" & strFilePath

    That assumes strFilePath contains the value you got from the FileDialog object after the user browsed to the file they selected.

    Hope that helps...

    Monday, July 20, 2015 8:00 PM