Combo box Hyperlink (1 Viewer)

JPR

Registered User.
Local time
Today, 00:26
Joined
Jan 23, 2009
Messages
192
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

..forever waiting... waiting for jellybean!
Local time
Today, 15:26
Joined
May 7, 2009
Messages
19,229
you need:

LstLinks.Column(2) not Column(1)
 

JPR

Registered User.
Local time
Today, 00:26
Joined
Jan 23, 2009
Messages
192
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

..forever waiting... waiting for jellybean!
Local time
Today, 15:26
Joined
May 7, 2009
Messages
19,229
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, 03:26
Joined
Jan 11, 2013
Messages
3,910
why bother with hyperlink datatype? just use text.
 

JPR

Registered User.
Local time
Today, 00:26
Joined
Jan 23, 2009
Messages
192
Got it working. Thank you
 

bastanu

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

JPR

Registered User.
Local time
Today, 00:26
Joined
Jan 23, 2009
Messages
192
This works fine. Thank you

Application.FollowHyperlink Me.mycombo.Column(2)
 

Users who are viewing this thread

Top Bottom