ComboBox help (1 Viewer)

SUICIDEKING13

New member
Local time
Today, 12:08
Joined
Nov 8, 2012
Messages
7
Hello im new and im sure theres a thread already that has addressed this issue but im in sort of a hurry.

I should mention that i've never used VBA before and i can do some sorts with Macros but im not really to well at expressions yet either.

I've created a table with a hyperlink field called Useful links.

I've also created a Form in which ive placed a combobox linked to my hyperlink table.

What im trying to do is use that combobox drop down list to select the record (hyperlink) that i want and a button to open that hyperlink URL. is there a simple way i can do this with a macro or expression? please help. Thank you so much. Cheers!
 

Isskint

Slowly Developing
Local time
Today, 17:08
Joined
Apr 25, 2012
Messages
1,302
application.FollowHyperlink ComboBoxName
 

SUICIDEKING13

New member
Local time
Today, 12:08
Joined
Nov 8, 2012
Messages
7
application.FollowHyperlink ComboBoxName

so im still not sure about this. i've never used VBA code before.

is this right? it gives me an error code every time i try to use it.

Private Sub Command2_Click()
Application.FollowHyperlink useful
End Sub


this ^^^^ lives in my button in events "on click" ?
 

Isskint

Slowly Developing
Local time
Today, 17:08
Joined
Apr 25, 2012
Messages
1,302
OK, if you get errors on that try using the Hyperlink.Follow method of a control. So long as you only have 1 field in your combobx this should work.

Me.useful.Hyperlink.Follow

If you have more than 1 field in your combobox, place an invizible textbox on you form (set its Visible property to no). Then use this code

Me.InvizibleTextbox = me.useful.Column(x)'where x is the column number holding the value for the hyperlink
Me.InvizibleTextbox.Hyperlink.Follow
 

SUICIDEKING13

New member
Local time
Today, 12:08
Joined
Nov 8, 2012
Messages
7
OK, if you get errors on that try using the Hyperlink.Follow method of a control. So long as you only have 1 field in your combobx this should work.

Me.useful.Hyperlink.Follow

If you have more than 1 field in your combobox, place an invizible textbox on you form (set its Visible property to no). Then use this code

Me.InvizibleTextbox = me.useful.Column(x)'where x is the column number holding the value for the hyperlink
Me.InvizibleTextbox.Hyperlink.Follow

worked like a charm. Cheers!!
 

Users who are viewing this thread

Top Bottom