MS Access 2007 Combo Box

  • Thread starter Thread starter JSSherm
  • Start date Start date
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.
 
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
 
Back
Top