MS Access 2007 Combo Box

J

JSSherm

Is it possible to add a hyper-link to combo box items. I'm making a list of
dog breeds and would like the viewer to click each specific breed that would
link to a detailed PDF of that breed.
 
K

Ken Snell \(MVP\)

Not in the value that is being displayed in the combo box, but you can do it
indirectly.

Add a field to the query that is the Row Source of the combo box -- use this
field to hold the path to the PDF document for the breed in that record.
Then, use VBA code to open that PDF document when the user, for example,
double-clicks the combo box. Assuming that the PDF path field is the second
column in the combo box's Row Source query, the code would look something
like this:

Private Sub ComboBoxName_DoubleClick(Cancel As Integer)
If Len(Me.ComboBoxName.Column(1) & "") > 0 Then _
Application.FollowHyperlink Me.ComboBoxName.Column(1)
End If
 

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