Originally Posted by
pbaldy
If the combo contains the full path to the file, you should be able to use FollowHyperlink in the after update event of the combo. More info in VBA help on FollowHyperlink.
Hmmmmm, okay. I've thought about it more and researched more and basically now all I need is this new button to select from a field of hyperlinks associated with each respective "part number'. Say I have these two fields, and the user just selected the part number from a drop down menu. Now I'd like to know the code so this "get pdf" button can associate with that dropdown selection and popup the file once the user clicks the button.
so the code should start like application.followhyperlink ... and then where does the field full of hyperlinks go (lets call this field 'linkstopdf')?
Edit: Here's the event procedure code:
Code:
Private Sub Command47_Click()
Dim strAcPath As String
Dim strFName As String
If IsNull(Me.[Part #]) = True Then
MsgBox "You must select a PDF from the list", vbCritical, "Selection Error"
[Part #].SetFocus
Else
strFName = Me.[Part #].Column(33)
strAcPath = "C:\Program Files (x86)\Adobe\Reader 10.0\Reader\AcroRd32.exe"
Call Shell(strAcPath & " " & [strFName], vbMaximizedFocus)
End If
End Sub
I want to open the pdf from the user selected dropdown of the part number. The pdf hyperlinks are stored in a separate field in a table.