Results 1 to 5 of 5
  1. #1
    briar is offline Novice
    Windows 10 Access 2016
    Join Date
    May 2020
    Posts
    9

    Command Button on form to launch hyperlink specific to each record

    Is there a way to add a Button on Form that will launch the hyperlink contents of a specific field, where the hyperlink is different for each record.



    I have created a hyperlink field "ImageLocation" and have have entered specific filepath to a unique folder for each record in my database. I have added the field to my form, and it works, but hoping to replace the field with something more aesthetic, like a button or an image that will launch to the correct folder on each individual record. Thank you!!

  2. #2
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    Application.FollowHyperlink Me.txtYourTextboxName ?
    Then there is this, in case you're confronted with security warnings
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #3
    briar is offline Novice
    Windows 10 Access 2016
    Join Date
    May 2020
    Posts
    9
    See below...

  4. #4
    briar is offline Novice
    Windows 10 Access 2016
    Join Date
    May 2020
    Posts
    9
    Good morning Micron,

    Thank you for the help! I'm a novice, so if you don't mind I will need a little hand holding. Do I create a macro for this? With my field name, I assume it should look like:
    Application.FollowHyperlink Me.txtImageLocation

    I tried to 'school' myself on where to put this after checking out the link you included. I found something on Web about using a module, so I created the following, but got a Compile Error, Sub or Function not defined:


    Private Sub Browse_Click()

    Call GoHyperlink(Me.[ImageLocation])

    End Sub

    Thanks again for the help

  5. #5
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    Not sure why you created a separate function for this, but if that's what you need, the problem likely is that you made it private. Since you are inclined to do your own research (and I like that ) then change Private to Public, which should eliminate that error message, then research MS Access variable scope.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

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

Similar Threads

  1. Replies: 2
    Last Post: 04-05-2019, 12:42 PM
  2. Replies: 1
    Last Post: 02-06-2016, 05:30 AM
  3. Replies: 3
    Last Post: 08-18-2015, 05:19 AM
  4. Replies: 2
    Last Post: 11-01-2013, 09:57 AM
  5. Replies: 10
    Last Post: 09-15-2011, 03:58 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