call up a pdf file based on a serila number

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

This sounds simple but I'm having all sorts of problems doing it.

We have a Access 2003 form that I would like a button on it to open up a
particular PDF file based on the Varibale SerialNo on the form.

The PDF's will always be in the same path and have the same file name as the
SerialNo variable.

ie SerialNo 1234 would need to open G:\Where the files are stored\1234.pdf

Thanks for any help you can give.

Colin
 
I was able to get the following to work with cmd.exe, but not with
command.com.

Shell "cmd.exe /c Start """" ""C:\Documents and
Settings\Wayne\Desktop\fwhistory150.pdf"""

The reason for the multiple quotes is to have quotes in the output of the
string to handle the path name with spaces in it.
 
Thanks Wayne, in the end I used :-

Dim strFileName As String

strFileName = "G:\Service Contracts\Declarations\" & Me.SerialNo & ".pdf"
Application.FollowHyperlink strFileSpec

Worked a treat.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top