David Ball
Registered User.
- Local time
- Tomorrow, 02:43
- Joined
- Aug 9, 2010
- Messages
- 230
Hi,
I have a form with a Combo Box (Combo3) where I can select Part Numbers.
I have a Command Button (Command10) that I am trying to use to open a PDF drawing with a file name that matches the part number. (The PDF’s have file names the same as the Part Numbers).
The code I have been trying is:
Private Sub Command10_Click()
Application.FollowHyperlink ("C:\Drawings\ " & Me.[Combo3] & ".pdf")
End Sub
One possible problem is that the Part Numbers are of the format GFH-Q-1401-02 and when I tried entering a part number directly into my code to test that I noticed that Access changed it to GFH-Q1401-2, helpfully removing the zero. This will no longer match my drawing file name.
How can I modify my code to get this working?
Thanks very much
I have a form with a Combo Box (Combo3) where I can select Part Numbers.
I have a Command Button (Command10) that I am trying to use to open a PDF drawing with a file name that matches the part number. (The PDF’s have file names the same as the Part Numbers).
The code I have been trying is:
Private Sub Command10_Click()
Application.FollowHyperlink ("C:\Drawings\ " & Me.[Combo3] & ".pdf")
End Sub
One possible problem is that the Part Numbers are of the format GFH-Q-1401-02 and when I tried entering a part number directly into my code to test that I noticed that Access changed it to GFH-Q1401-2, helpfully removing the zero. This will no longer match my drawing file name.
How can I modify my code to get this working?
Thanks very much