PC Review


Reply
Thread Tools Rate Thread

call up a pdf file based on a serila number

 
 
=?Utf-8?B?Q1RDIC0gQ29saW4=?=
Guest
Posts: n/a
 
      22nd Feb 2005
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
 
Reply With Quote
 
 
 
 
Wayne Morgan
Guest
Posts: n/a
 
      22nd Feb 2005
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



 
Reply With Quote
 
=?Utf-8?B?Q1RDIC0gQ29saW4=?=
Guest
Posts: n/a
 
      23rd Feb 2005
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

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Matching call data based on date, time and number called to give c Twiggy Microsoft Excel Misc 1 22nd Feb 2010 09:26 PM
Inserting a number of rows based on the number of columns filled bytext values zorakramone Microsoft Excel Programming 4 3rd Aug 2009 08:21 AM
Updating Two Fields in Update Query based on call number =?Utf-8?B?TVNocmVjaw==?= Microsoft Access Queries 0 9th Oct 2006 02:49 PM
Are we new users supposed to call this number? I have auto dial on my XP in the dialer but am I required to call? Windows XP New Users 12 26th May 2005 03:47 PM
VBA to call file based on date fLiPMoD£ Microsoft Excel Misc 2 23rd Apr 2005 09:24 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:10 PM.