Is it always going to be PDF? if not, just create a hyper link field which will contain the document address.
Originally Posted by SpireWindows
If it is always going to be a PDF you can use the following in a command button. This works by by saving the PDF as the same name as a letterid field on your form. And you will always save any letters in the same folder, (which is good practice anyway).
Obvioulsy stAppName must equal the exact adress of Adobe Acrobat.
If you do want to use this method i sugest you make a sub form, tabular. With fields, Cutomer ID, Letter ID, Description. and put a command button on the side.
Private Sub Command_Click()
On Error GoTo Err_Command_Click
Dim stAppName As String
Dim varFile As String
varFile = "S:\FolderNAme\" & [LetterIDField] & ".pdf"
stAppName = "C:\Program Files\Adobe\Acrobat 7.0\Reader\AcroRd32.exe " & varFile
Call Shell(stAppName, 1)