Open hyperlink from a list box (1 Viewer)

umair434

Registered User.
Local time
Today, 12:54
Joined
Jul 8, 2011
Messages
186
Hi guys,

I have searched this forum, google and other access help but can't find a solution to this seemingly easy problem

I have a simple table with the following fields:

tbl Report:

Repord Id
NmeReport
LocationReport - I added a hyperlink here and set it's field to "Hyperlink"


What I want to do is create a list box which shows the Reports Name and the hyperlink. Clicking on each report should open the document. I have not been able to find a solution for this.

Note: My hyperlinks in the table work fine - must be some code required ..

please help :(
 

umair434

Registered User.
Local time
Today, 12:54
Joined
Jul 8, 2011
Messages
186
Hi Richard,

thank you for the replying. I'm sorry for not being clear, but "reports" are just the name of documents (not the access reports). I just want to list the fields of my table in a list box (which is easy) - However, one of the fields is a hyperlink so how do I make that clickable in the list box.


thanks again
 

spikepl

Eledittingent Beliped
Local time
Today, 21:54
Joined
Nov 3, 2010
Messages
6,142
You don't have separate clickable "fields" in a listbox. You can make a subform with datasheet view, and that would give you a link to click on. Or you can extract the URL from the appropriate column of the selected listbox item in a double-click event and then use the FollowHyperlink method to open the doc in question.
 

umair434

Registered User.
Local time
Today, 12:54
Joined
Jul 8, 2011
Messages
186
Thanks spikepl!

what would be the follow hyperlink method? I know it's a small line of code but I don't rememeber it correctly :S
 

spikepl

Eledittingent Beliped
Local time
Today, 21:54
Joined
Nov 3, 2010
Messages
6,142
type FollowHyperlink in a vba window, put the cursor on it and press F1
 

umair434

Registered User.
Local time
Today, 12:54
Joined
Jul 8, 2011
Messages
186
sorry but it went over my head. It describes a function and all but I don't get it..

my list box has many rows - each row being a hyperlink field - how do I reference that in the VBA? :S
 

umair434

Registered User.
Local time
Today, 12:54
Joined
Jul 8, 2011
Messages
186
Or you can extract the URL from the appropriate column of the selected listbox item in a double-click event and then use the FollowHyperlink method to open the doc in question.

how would i do that? MS help didn't help much!
 

Users who are viewing this thread

Top Bottom