Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Execute hyperlink from combo box 1

Status
Not open for further replies.

BSman

Programmer
Apr 16, 2002
718
US
Using Access 2000, I dynamically develop the value list for a combo box. Each value list record includes data necessary to create a hyperlink to a document storage system that will enable the document system to retrieve and display the document (PDF file).

When the user selects a document from the drop down combo box list I want to automatically execute the hyperlink. So far, all I have been able to do is load the hyperlink into the property of a command button, but the user must click the button before the hyperlink is executed.

I even moving the focus to the command button (after making it visible) and for the onGotFocus property of the button re-loading the hyperlink address. No luck. And even if I still have to use the button, I can't find a way to simulate a mouse click on the button, which would automatically execute the hyperlink.
 
Did you try directly calling the _Click event of the command button?


Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
I created a comboBox that has a record source of various URL's. Then I created an event 'AfterUpdate' to open the link. Is that what you wanted to do?
Code:
Private Sub Combo4_AfterUpdate()
    Application.FollowHyperlink Combo4.Value
    
End Sub
 
Thanks, DaltonVB. The Application.FollowHyperlink was exactly what I needed to add to the OnUpdate code for the combo box.

Bob S.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top