Question : FollowHyperlink on Access Form

I have an Access form with a button on it and shared drive with a directory containing .pdf's. On the form I have a field named MLCAT that is the primary key. The MLCAT for a given record matches the corresponding PDF in the shared directory. When I click my "Get PDF" button I want it to open the corresponding PDF. Here's the code I have so far:

Private Sub getPDF_Click()
Const cstrDrawings = "F:\Customer Drawings\"

On Error Resume Next
   
    FollowHyperlink cstrPicsFolder & mlcat
End Sub

When I click the button it looks at the MLCAT field and pulls the name but it doesn't open the PDF with the matching name. How can I get this to work? Thanks.
Code Snippet:
1:
2:
3:
4:
5:
6:
7:
Private Sub getPDF_Click()
Const cstrDrawings = "F:\Customer Drawings\"
 
On Error Resume Next
    
    FollowHyperlink cstrPicsFolder & mlcat
End Sub

Answer : FollowHyperlink on Access Form

still this

F:\Customer Drawings\EXAMPLE001

will not be recognized as a complete file path,  there is no extension

maybe you could do this

FollowHyperlink cstrDrawings & MLCAT & ".pdf"

if the file extension is .pdf
Random Solutions  
 
programming4us programming4us