form list box based on query - inactive hyperlink

G

Guest

Hi there,

I have a form with three combo boxes that populate according to the choice
in the previous combo box. Once the user makes the selection from the last
combo box, the results will display within a list box based on a query. One
of the fields within the resulting records is a hyperlink field. The
hyperlink is not active.

Since the hyperlink remains active when I open the query directly, I'm
assuming the problem is related to outputting the results in the list box.

Is it possible to make the hyperlink active in the list box? If not, what
is an alternative solution.

Cheers,

Mike
 
K

Ken Snell \(MVP\)

No, a hyperlink is not active in a listbox's record.

Various "workarounds" are possible, but I recommend that you put a command
button next to the list box, and let the user click the button when the
correct record has been selected in the listbox, and run code via the
button's click event to follow the hyperlink. In the code example below, I'm
assuming that the hyperlink column is the fourth one in the listbox:

Private Sub CommandButtonName_Click()
Application.FollowHyperlink Me.ListBoxName.Column(3)
End Sub
 
G

Guest

Thanks for the info! Perfect solution!

Ken Snell (MVP) said:
No, a hyperlink is not active in a listbox's record.

Various "workarounds" are possible, but I recommend that you put a command
button next to the list box, and let the user click the button when the
correct record has been selected in the listbox, and run code via the
button's click event to follow the hyperlink. In the code example below, I'm
assuming that the hyperlink column is the fourth one in the listbox:

Private Sub CommandButtonName_Click()
Application.FollowHyperlink Me.ListBoxName.Column(3)
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top