Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

html within combo box?

Status
Not open for further replies.

shy216

Programmer
Jul 21, 2005
142
0
0
US
is it possible to make a selection from a combo box and link a distinct html depending on the selection?
 
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: "
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
 
would that work /w multiples tho?
like each selection from the combo box linking to different website?
 
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
 
does that mean i need to set the values of the cbo box as a html? where would i put html values?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top