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.
"Wayne Morgan" wrote:
> 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.
>
> --
> Wayne Morgan
> MS Access MVP
>
>
> "CTC - Colin" <(E-Mail Removed)> wrote in message
> news:C5448630-CE19-4DCB-99E2-(E-Mail Removed)...
> > 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
>
>
>
|