Combo box-Hyperlink (1 Viewer)

cktcPeterson

Member
Local time
Today, 03:18
Joined
Mar 23, 2022
Messages
73
Is there a way to have a combo box and when click on the option it opens a hyperlink?

I have a table with the list of forms and then I have a webpage to get the form

Table fields
File Name
File link
 

theDBguy

I’m here to help
Staff member
Local time
Today, 04:18
Joined
Oct 29, 2018
Messages
21,473
Have tried the Application.FollowHyperlink method?
 

cktcPeterson

Member
Local time
Today, 03:18
Joined
Mar 23, 2022
Messages
73
No. Could you guide me a little more on that?

Right now have the combo box with 2 fields and when I select the form, the hyperlink shows. I then click on it.

I want to stream line that process.
 

moke123

AWF VIP
Local time
Today, 07:18
Joined
Jan 11, 2013
Messages
3,920
Dont use hyperlink datatype. Use a string with just the link.

In your combo use 3 columns. Your primary key, the name for your link, and your link (as a string)

In the after update event put

Application.FollowHyperlink Me.yourComboName.Column(2)
 

cktcPeterson

Member
Local time
Today, 03:18
Joined
Mar 23, 2022
Messages
73
This is what I put and it does not work

Private Sub cboInvoices_AfterUpdate()
Application.FollowHyperlink Me.cboInvoices.Column(2)
End Sub

My combo box has 2 fields
File name and the hyerlink field (not as a hyperlink datatype)

I get an error
Invalid use of Null
 

theDBguy

I’m here to help
Staff member
Local time
Today, 04:18
Joined
Oct 29, 2018
Messages
21,473
This is what I put and it does not work

Private Sub cboInvoices_AfterUpdate()
Application.FollowHyperlink Me.cboInvoices.Column(2)
End Sub

My combo box has 2 fields
File name and the hyerlink field (not as a hyperlink datatype)

I get an error
Invalid use of Null
If your combo only has two columns, then Column(2) is referring to a third column.

Can you show us the SQL statement for your combo's row source? Thanks.
 

Users who are viewing this thread

Top Bottom