Results 1 to 4 of 4
  1. #1
    Torinjr is offline Advanced Beginner
    Windows 7 32bit Access 2013
    Join Date
    May 2015
    Posts
    53

    Opening HyperLinks from a Combobox.

    I have a table that contains hyperlinks to excel files. These hyperlinks are displayed in a form in a combobox 'cboHyperlink'. How can i open the associated excel file by clicking on the Hyperlink from the combobox?



    Would i use something like this? - Does not work btw.

    Private Sub cboHyperlink_AfterUpdate()

    DoCmd.RunCommand acCmdOpenHyperlink

    End Sub

    Thanks.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,816
    What do you mean by 'does not work' - error message, wrong results, nothing happens?

    Review:

    http://allenbrowne.com/func-GoHyperlink.html

    http://www.allenbrowne.com/casu-09.html
    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
    Torinjr is offline Advanced Beginner
    Windows 7 32bit Access 2013
    Join Date
    May 2015
    Posts
    53
    Click image for larger version. 

Name:	Untitled.jpg 
Views:	9 
Size:	188.6 KB 
ID:	20606
    I have attached what the combobox looks like in form mode and some of the properties. Here is the code, which is what i need help with?

    Private Sub Combo20_AfterUpdate()

    DoCmd.RunCommand acCmdOpenHyperlink
    End Sub

    I want to select an item in the combo box, which will open the excel sheet. At the moment i get this run time error. Thanks

    Click image for larger version. 

Name:	Untitled3.png 
Views:	9 
Size:	22.5 KB 
ID:	20605
    Attached Thumbnails Attached Thumbnails Untitled.jpg  

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,816
    Use FollowHyperlink or the Allen Browne function as described in the referenced links. Access Help has more info on FollowHyperlink

    FollowHyperlink (Me.Combo20)
    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.

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

Similar Threads

  1. hyperlinks
    By sdel_nevo in forum Programming
    Replies: 2
    Last Post: 06-11-2013, 02:34 PM
  2. Opening form with defined combobox value
    By Kivan in forum Programming
    Replies: 2
    Last Post: 08-10-2012, 04:30 AM
  3. Opening Different Reports on Combobox Selection
    By confusedlilly19 in forum Reports
    Replies: 1
    Last Post: 06-24-2012, 03:46 PM
  4. Hyperlinks (UNC)
    By ccordner in forum Forms
    Replies: 1
    Last Post: 02-01-2012, 02:16 PM
  5. Hyperlinks
    By Issy in forum Access
    Replies: 0
    Last Post: 11-13-2007, 04:46 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