Combo box Hyperlink (1 Viewer)

JPR

Registered User.
Local time
Today, 03:27
Joined
Jan 23, 2009
Messages
151
Hello,

I have added a combo to a form which has its record source to a table with three fields. It is used to open pdf/doc files.

- City
- Title
- Hyperlink

The combo will only display the document's Title as I have set the Column Width to: 0";1";0"
Unfortunately the following code, does not work as getting a run time error 424:

"Application.FollowHyperlink Split(lstLinks.Column(1), "#")(1)"

Appreciate any help.
 

arnelgp

once i caught a fish alive...
Local time
Today, 18:27
Joined
May 7, 2009
Messages
13,201
you need:

LstLinks.Column(2) not Column(1)
 

JPR

Registered User.
Local time
Today, 03:27
Joined
Jan 23, 2009
Messages
151
Thank you. Unfortunately it still gives me the same error. If I try to open the hyperlink, directly from the table, it works fine. The files are locally stored on a shared drive.
 

arnelgp

once i caught a fish alive...
Local time
Today, 18:27
Joined
May 7, 2009
Messages
13,201
for a test, add an Unbound textbox (txtLink) to your form.
set the textbox controlsource to:

=[lstLinks].[Column](2)

change your code to:

Me!txtLink.Hyperlink.Follow
 

moke123

AWF VIP
Local time
Today, 06:27
Joined
Jan 11, 2013
Messages
2,470
why bother with hyperlink datatype? just use text.
 

JPR

Registered User.
Local time
Today, 03:27
Joined
Jan 23, 2009
Messages
151
Got it working. Thank you
 

bastanu

AWF VIP
Local time
Today, 03:27
Joined
Apr 13, 2010
Messages
820
Glad to hear, care to say how, it would help others with similar issue in the future.
Cheers,
 

JPR

Registered User.
Local time
Today, 03:27
Joined
Jan 23, 2009
Messages
151
This works fine. Thank you

Application.FollowHyperlink Me.mycombo.Column(2)
 

Users who are viewing this thread

Top Bottom