Nov 11, 2005 #1 shy216 Programmer Joined Jul 21, 2005 Messages 142 Location US is it possible to make a selection from a combo box and link a distinct html depending on the selection?
is it possible to make a selection from a combo box and link a distinct html depending on the selection?
Nov 11, 2005 #2 Aivars Programmer Joined May 4, 2001 Messages 687 Location LV Hi! The hyperlink support only controls of type acLabel, acImage, acCommandButton. But it's possible to solve it using label control. Example. Create a combobox named "Combo0", and label named "Label0" Set the folloving Combobox data: RowSourceType: Value List RowSource: "http://www.microsoft.com";"http://www.tek-tips.com" Copy and paste the folloving into form module vindow. Private Sub Combo0_AfterUpdate() With Me.Label0 .Visible = False .HyperlinkAddress = Me.Combo0 .Hyperlink.Follow True End With End Sub Good luck! Aivars Upvote 0 Downvote
Hi! The hyperlink support only controls of type acLabel, acImage, acCommandButton. But it's possible to solve it using label control. Example. Create a combobox named "Combo0", and label named "Label0" Set the folloving Combobox data: RowSourceType: Value List RowSource: "http://www.microsoft.com";"http://www.tek-tips.com" Copy and paste the folloving into form module vindow. Private Sub Combo0_AfterUpdate() With Me.Label0 .Visible = False .HyperlinkAddress = Me.Combo0 .Hyperlink.Follow True End With End Sub Good luck! Aivars
Nov 11, 2005 Thread starter #3 shy216 Programmer Joined Jul 21, 2005 Messages 142 Location US would that work /w multiples tho? like each selection from the combo box linking to different website? Upvote 0 Downvote
would that work /w multiples tho? like each selection from the combo box linking to different website?
Nov 11, 2005 #4 PHV MIS Joined Nov 8, 2002 Messages 53,708 Location FR You may try this in the AfterUpdate event procedure of the combo: Application.FollowHyperlink Me![combo name].Value Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886 Upvote 0 Downvote
You may try this in the AfterUpdate event procedure of the combo: Application.FollowHyperlink Me![combo name].Value Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
Nov 11, 2005 Thread starter #5 shy216 Programmer Joined Jul 21, 2005 Messages 142 Location US does that mean i need to set the values of the cbo box as a html? where would i put html values? Upvote 0 Downvote